Hardware Reference
In-Depth Information
The code uses a modified version of the Adafruit library, which
has some fixes. So, as long as you are using the bicolor version
of the matrix, you should use this library only.
grid = ColorEightByEight(address=0x70)
The grid-based object needs to be instantiated in the program with an identified
address, 0x70 .
Here's a tip about I2C-tools: If you want to know where this
address comes from, watch the video at http://derekmolloy.
ie/beaglebone/beaglebone-an-i2c-tutorial-
interfacing-to-a-bma180-accelerometer/ .
The remaining code is taken from the twisted matrix examples, which are handy to
manage network applications. Finally, the following screenshot shows the main part
of the server code:
The client part is also based on the Twisted Matrix example with a modification in the
EchoClient class. The client will do the following:
• Establish a connection to the server.
• Check whether the server is alive.
• With a successful connection, some frames are generated to fill the matrix
line by line. This is the purpose of the two for loops.
 
Search WWH ::




Custom Search