OLIMEX MOD-IO2 User Manual page 14

Extension board
Table of Contents

Advertisement

OLIMEX© 2024
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 2 -r
,where
-B 2
– 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 (AN0, AN5, AN6):
./modio2tool -B 2 -a 0
,where
-B 2
– sets the board to use its hardware I2C #0 (typically either "0", "1", or "2")
-a 0
– "a" is used to read the analog input; "1" is the analog input that is read – you can use "0", "5",
"6" since not all AN signals are available.
Expected result: the voltage at the AN would be printed. If there is nothing connected it can be anything
like "ADC1: 2.311V".
ADC is 10-bit.
- Changing the I2C address – if you use more than one MOD-IO2 (available since MOD-IO2's
firmware revision 3.02)
./modio2tool -B 0 -x 15
,where
-B 0
– sets the board to use its hardware I2C #0 (typically either "0", "1", or "2")
-x 15 – "x" is used to change the I2C address of the board; "15" is the desired number – it is different
Page 14 of 28
MOD-IO2 user's manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MOD-IO2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents