Hardware Reference
In-Depth Information
When the client has finished, the matrix appears with all its LEDs lit, as shown here:
What we have done so far is connecting our client application to a specific server
in order to provide a service—remember the translation we talked about before—
dedicated to a device, which is our LED matrix.
From a larger point of view, we have seen a project that aims to implement
some customized hardware.
You can easily adapt this project to use any hardware of your choice or any
off-the-shelf modules available, as described in the cape paragraph from
Chapter 5 , Building Your Media Player .
Questions and suggestions related to this example
The following are the questions and suggestions related to this example:
• Have you noticed that with the provided library the loop evolves in a
particular sense?
• I've left a clear_matrix function that is yet to be used: what needs to be
implemented on the client side in order to request the matrix to be cleared?
• You can imagine action words to create your own protocol, such as executing
a predefined pattern, animation, and so on.
• Instead of using a hardcoded configuration, a cool improvement will
be to parse an external file. For example, you can use configparser
( https://wiki.python.org/moin/ConfigParserExamples ), or if
you don't like INI files, the PyYAML syntax ( http://pyyaml.org/
wiki/PyYAML ) is a good alternative.
Example 2 - improving the first example by
adding functionalities
As you have quickly acquired confidence with the previous example, I'm sure you
want to improve your project, and different ideas might come to mind. We are going
to implement some of them.
 
Search WWH ::




Custom Search