Create a Custom User Interface

A default user interface comes with the Web enabled Pixel app.  It is available at:

http://rapberrypi:8080/files/index.html

A custom user interface to control Pixel can be made by posting to the following URLs, or Web API.  Any programming language that can make HTTP requests can control the Pixel with this Web API.

Scrolling Text

http://rapberrypi:8080/text

change to scrolling text mode

http://rapberrypi:8080/text?t=some text to scroll

this will scroll ‘some text to scroll’ on the pixel

http://rapberrypi:8080/text/color/[hex-value]


example:

http://rapberrypi:8080/text/color/48301b

This sets the color of the scrolling text.  The ‘hex-value’ given is used as the color.

http://rapberrypi:8080/text/speed/[delay-in-milliseconds]

example:
http://rapberrypi:8080/text/speed/300

This sets the scroll delay in milliseconds.


Still Images

http://rapberrypi:8080/still

Change to still images mode.

http://rapberrypi:8080/still/list

This URL returns a list of the available still images names.  The image names are delimited by "-+-".

http://rapberrypi:8080/still/[image-name]

examples:

http://rapberrypi:8080/still/Robot.png

http://rapberrypi:8080/still/Fireball.png

This writes the image denoted by the ID at the end of the URL.  The ID is an integer that is used as an index into the still images available to the Web app.

 Animations

http://rapberrypi:8080/animation

Change to animations mode.

http://rapberrypi:8080/animation/list

same as still images but for animations

http://rapberrypi:8080/animation/[animation-name]


examples:

http://rapberrypi:8080/animation/arrows.png

http://rapberrypi:8080/animation/earth.png

same as still images but for animations

http://rapberrypi:8080/animation/save/[animation-name]


examples:

http://rapberrypi:8080/animation/save/arrows.png

http://rapberrypi:8080/animation/save/earth.png

saves an animation to the SD card, for offline playback

 

 Static Files

http://rapberrypi:8080/files/

static files are served from this URL context; HTML, CSS, JavaScript, image and animation previews

http://rapberrypi:8080/files/images/

examples:

http://rapberrypi:8080/files/images/Fireball.png
http://rapberrypi:8080/files/images/Robot.png

previews for the still images are under this URL context

http://rapberrypi:8080/files/animations/

examples:

http://rapberrypi:8080/files/animations/arrows.png
http://rapberrypi:8080/files/animations/earth.png

previews for the animations are under this URL context

 

 

Uploads

http://rapberrypi:8080/upload/

Uploads a HTTP post with a mulit-part file attachment.  

The name of the file parameter should be 'upload'.

The request parameter named 'upload-type' is expected to have the value of 'STILL_IMAGE' or 'ANIMATED_GIF'.

 

 

Analog Clock

http://rapberrypi:8080/clock

Change to analog clock mode.

 

 

Modify the App

The source code for the Pixel application is on Github.

https://github.com/alinke/PIXEL

The recomened way to make changes to the application is with the Netbeans IDE. In Netbeans, open the directory where you cloned Pixel from Github.  It will recognize and open a parent project labeled 'onebeartoe-pixel'.

The 'onebeartoe-pixel' project has other projects listed under 'Modules'. Open the one labeled 'pixel-web-enabled'.  And make any change that better fit your setup.  The F6 key compiles and runs the app locally.

Keep Up with Development Builds

More features are planned for the Web applicaiton for Pixel.  Keep up with the development builds:

https://onebeartoe.ci.cloudbees.com/job/pixel/

This guide was first published on Jan 03, 2015. It was last updated on Jan 03, 2015.

This page (Going Further) was last updated on Dec 31, 2014.

Text editor powered by tinymce.