Difference between revisions of "Grove - 6-Position DIP Switch"
From Teknologisk videncenter
m |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | Seeed [https://wiki.seeedstudio.com/Grove-6-Position_DIP_Switch/ Grove - 6-Position DIP Switch] | ||
+ | |||
=Linux Beagleboard= | =Linux Beagleboard= | ||
+ | |||
==Command line== | ==Command line== | ||
Read switch positions - notice byte 5 to 10. | Read switch positions - notice byte 5 to 10. | ||
Line 13: | Line 16: | ||
i2cset -y 2 0x03 0xc0 0x10 | i2cset -y 2 0x03 0xc0 0x10 | ||
</source> | </source> | ||
+ | |||
+ | Example: See [[Beaglebone black i2c]] | ||
[[Category:grove]][[Category:Beagleboard]] | [[Category:grove]][[Category:Beagleboard]] |
Latest revision as of 11:57, 5 April 2024
Seeed Grove - 6-Position DIP Switch
Linux Beagleboard
Command line
Read switch positions - notice byte 5 to 10. Posistions: 101101 (Reversed polarity)
debian@beaglebone:~/bin/dip$ i2ctransfer -y 2 w1@0x10 0x01 r10
0x00 0x00 0x00 0x80 0x00 0x01 0x00 0x00 0x01 0x00
- Change I2C address
- Change address from 0x03 to 0x10
i2cset -y 2 0x03 0xc0 0x10
Example: See Beaglebone black i2c