
OLIMEX© 2015
MOD-IO2 user's manual
- Switching on both relays:
./modio2tool -B 0 -s 3
,where
-B 0
– sets the board to use its hardware I2C #0 (typically either “0”, “1”, or “2”)
-s 3
– “s” is used to turn on the relays; “3” specifies to turn on both relays (use “1” or “2” for
only the first or only the second relay)
Expected result: a specific sound would occur and relay LEDs would turn on.
- Switching off both relays:
./modio2tool -B 0 -c 3
,where
-B 0
– sets the board to use its hardware I2C #0 (typically either “0”, “1”, or “2”)
-c 3
– “c” is used to switch off the state relays; “3” specifies to turn off both relays (use “1” or
“2” for only the first or only the second relay)
Expected result: a specific sound would occur and the relay LEDs would turn off.
- Reading the status of the relays (available since MOD-IO2's firmware revision 3.02):
./modio2tool -B 0 -r
,where
-B 0
– sets the board to use its hardware I2C #0 (typically either “0”, “1”, or “2”)
-r
– “r” is used to read the relays;
Expected result: the state of the relays would be printed. 0x03 means that both relays are on
(equivalent of the binary 0x011).
- Reading analog inputs:
./modio2tool -B 0 -A 1
,where
-B 0
– sets the board to use its hardware I2C #0 (typically either “0”, “1”, or “2”)
-A 1
– “A” is used to read the analog input; “1” is the analog input that is read – you can use “1”,
“2”, “3” or “5” since not all AN signals are available.
Expected result: the Voltage of the AN would be printed. If there is nothing connected it can be
anything like “ADC1: 2.311V”.
Page 9 of 28