Tuesday, 6th of January 2009
Tuesday, 6th of January 2009
"switch" — 1 post
Wired up a toggle switch to the robostix in the following manner:


GPIO----------switch--------------GND
|
|------------10k resistor--------Vcc


I have the switch on port c.7 and set the direction to in.

Switch is open
# i2c-io 0x0b getdir c.7
in
# i2c-io 0x0b get c.7
0

Switch is closed
# i2c-io 0x0b get c.7
1