Datasheet

Jon Waddington
38
3.7 X10 Settings
Adding and removing X10 devices from the information system can be done in “X10
Settings”. When adding a device, the user is first prompted to enter the name of the
device via the remote control or a keyboard. The device must then be assigned to one of
the four rooms; “Living Room”, “Dining Room”, “Kitchen” or “Bedroom. The user must
then specify whether the device is an appliance or lamp and the device address is then
entered.
The code below shows the variables used for storing devices.
byte name[160] 'device name array
byte dvc[16] 'device number array
byte addr[16] 'device address array
byte room[16] 'device room array
byte type[16] 'device type array
byte dvcnum 'device number
“name” is an array, used to store the name of the device. It is an array of 160 bytes
which means that each device can have a name of up to 10 characters, taking into
account that there is a maximum number of 16 modules for each housecode.
“dvc” is a 16 byte array which stores the hexadecimal address of the X10 module. A look
up table is then used to give the correct X10 device code to the “addr”.
The “addr” array stores the X10 device codes of the modules.
“room” corresponds to the room of the device, where a value of “0” is the “bedroom”, “1”
is the “living room”, “2” is the “dining room” and “3” is the kitchen”.
The device type is stored in “type”. A value of “0” means it is a device module and a
value of “1” means it is a lamp module.
“dvcnum” holds the number of devices. This can vary between 0 and 15 as the
maximum number of devices is 16.