Page 106 - Programming the Raspberry Pi Getting Started with Python
P. 106
to disp_mode to cycle the display mode. If the display mode has reached the end, it is set back to
time_mode.
Finally, the if blocks that follow select the appropriate display function, depending on the mode,
and then call it.
Summary
This project’s hardware can quite easily be adapted to other uses. You could, for example, present all
sorts of things on the display by modifying the program. Here are some ideas:
• Your current Internet bandwidth (speed)
• The number of e-mails in your inbox
• A countdown of the days remaining in the year
• The number of visitors to a website
In the next chapter, we build another hardware project—this time a roving robot—using the
Raspberry Pi as its brain.