Echelon IzoT NodeBuilder User Manual
Page 55

LTM-10A Platform and Gizmo 4 I/O Board
1. Declare the I/O hardware for the Switch following these steps:
a. Double-click the Switch.h file in the Project pane to edit the source file.
b. Find the following line of code near the end of the Editor window:
//}}NodeBuilder Code Wizard End
c. Add the following line of code after the line referenced in step b.
IO_6 input bit ioSwitch1;
2. Add functionality to the Switch I/O following these steps:
a. Double-click the Switch.nc file in the Project pane.
b. Find the following line of code at the end of the Editor window:
#endif // _Switch_NC_
c. Add the following when clause before the line referenced in step b:
when(io_changes(ioSwitch1))
{
nvoSwitch.state = !input_value;
nvoSwitch.value = input_value ? 200u : 0;
}
3. Declare the I/O hardware for the LED. To do this follow these steps:
a. Double-click the LED.h file in the Project pane.
b. Find the following line of code near the end of the Editor window:
//}}NodeBuilder Code Wizard End
c. Add the following line of code after the line referenced in step b.
IO_0 output bit ioLamp = 1;
4. Add functionality to the LED I/O following these steps:
a. Double-click the LED.nc file in the Project pane.
b. Find the following lines of code near the beginning of the Editor window:
when(nv_update_occurs(nviValue))
//
//}}NodeBuilder Code Wizard End
{
c. Add the following line of code after the lines referenced in step b:
io_out(ioLamp, !(nviLamp.value && nviLamp.state));
5. Click File and then click Save All to save all your changes to the source files.
6. Proceed to the next section to compile your Neuron C application, and then build an application
image and download it to your device.
For more information on editing Neuron C code to implement your device’s functionality, see Chapter
7, Developing Device Applications.
IzoT NodeBuilder FX User's Guide
41