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
Main Menu
Tags
Top 4 Tags: (All Tags)
- gumstix (12)
- robostix (5)
- giant squid (4)
- i2c (3)
Latest Posts
Top Blogs
