Creating example device applications, See creating example device, Applications – Echelon Mini FX User Manual
Page 97

84 Developing
Device
Applications
{
#ifndef USE_MINIGIZMO
SendLcdCommand(LCD_COMMAND_ON, 0, 1);
SendLcdCommand(LCD_COMMAND_BRIGHTNESS, 1, 2);
SendLcdCommand(LCD_COMMAND_CLEARSCREEN, 0, 1);
#else // use mini gizmo:
SerialOutput("\r\n---Reset");
#endif // mini gizmo
}
void LcdDisplayString(unsigned row, unsigned column, const char* data)
{
#ifndef USE_MINIGIZMO
// Set the cursor position:
static const unsigned lcdRowAddress[4] = {0x00, 0x40, 0x14, 0x54};
SendLcdCommand(LCD_COMMAND_SETCURSOR, lcdRowAddress[row]+column, 2);
// Send the data
(void)io_out(ioIIC, data, I2C_ADDRESS_LCD, (unsigned)strlen(data));
# ifdef _DEBUG
// In a debug build, forward the same data to the serial port:
SerialOutput(data);
# endif // _debug
#else // Use mini gizmo
// always send data to serial port (in lieu of a local display)
SerialOutput(data);
#endif // mini gizmo
}
//
// initialization entry point. The application calls this from when(reset):
//
//
// InitializeIO() is called from the when(reset) task and initalizes
// the I/O system and related driver functions.
//
void InitializeIO()
{
#ifdef USE_MINIGIZMO
#else
InitializeLCD();
#ifdef USE_5000EVB
io_change_init(ioSwitch1);
#endif // USE_5000EVB
#endif // USE_MINIGIZMO
} // InitializeIO
#endif // __IO_NC_
Creating Example Device Applications
This section provides a series of device applications based on the I/O examples created in
the previous section. These device applications introduce Neuron C and device
development concepts such as I/O objects and timers, network variables, configuration
properties, functional profiles, and ISI. There are three types of device applications
demonstrated in this section: digital sensor and digital actuator examples, a thermostat
example, and an ISI example.
Notes:
• The digital sensor and digital actuator examples require the LonMaker tool for
commissioning and for connecting their network variable to compatible devices.
Alternatively, you can add code to make these example applications self-installed (see
the ISI Example later in this section for how to do this). The thermostat example can
be run as a standalone application and does not require network integration. You
can use the LonMaker tool or ISI to integrate the thermostat example into a network.