Graph Example Code

To demonstrate how to use the Graph module an example with a Night mode switch will be used. An ATmega256RFR2 Xplained Pro with an I/O1 Xplained Pro extension is suitable as target hardware. The I/O1 extension board features a light sensor that can be used to detect whether it is night or day. This information can be used, for example, to switch a lamp on when the surroundings turn dark.

The example requires the following equipment and software:
To run the example, the following hardware setup is required: A picture of the setup is shown below.