3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Hard Drive Persistence of Vision (HDPOV)

Step 14Serial Command and Python Extras

Serial Command and Python Extras
The firmware, as-is, only provides a few built-in visuals. In order to get more visuals, you either need to hack the firmware, or you need to communicate with the firmware via its serial protocol.

You can either communicate with the firmware using a terminal application such as hyperterminal or minicom, or you can use a programing language like Perl, Python or Java to orchestrate animations. The firmware sets the serial port's BAUD at 115200. Along with the code to the firmware, you will find a script called "clock.py". This python script will draw a clock face on the platter using the serial communication protocol.

The firmware sets up the display for 255 individual slices. It builds a double-buffered frame-buffer, allocating one byte to represent each slice. The double-buffer allows you to draw to the device without disturbing the current frame. Once you upload your frame, you must issue a page flip command (command f) to have it displayed.

Serial commands:
r - Report on status
h - Write to the hidden page
v - Read the visible page
c - Clear the page
s - Set single slice number to a value
f - Flip page
1 - Setup test pattern 1
2 - Setup test pattern 2

« Previous StepDownload PDFView All StepsNext Step »
1 comment
Sep 10, 2011. 12:24 AMjberwick1 says:
anybody else having a hard time with python/serial/mac?

its giving me a bunch of trouble, and id hate to give up on such an awesome project, right at the end.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
6
Followers
2
Author:vishnubob