In this excerpt, we'll create the ultimate flashlight. With find-in-the-dark
flashing behavior and a power-audit mode, this single-button-controlled
device will become the ultimate in personal illumination for the twenty-first
century.
Figure 1 shows how the flashlight will be constructed. The .NET Micro
Framework device will have an input from a push-button switch and will
provide an output to a lamp. It will also have a connection to an external
device so that it can transfer usage information to the external device in
response to a trigger message.
To make the flashlight work, the program inside it must be able to perform a
number of tasks:
It will need to provide a signal to turn on the lamp. It will need to read
the state of the input button. For some of the later... (more)