Forgot your password?
No account? Register one!
May 31, 2009
Product BOB-08130 |
about 5 years ago
SDA to pin 4 on the analog header
SCL to pin 5 on the analog header
VCC to 5v
GND to GND
I/O pins need pull up resistors to VCC.
Board has A0-A2 with solder pads like (|). connect middle to left (power) for a 1, or right (gnd) for a 0. (see picture shown above)
setting the pins:
Wire.send(b); // byte for pins 0-7
Wire.send(b); // byte for pins 8-15
Wire.endTransmission(); // stop transmitting
The board supports id 0-7. Add 32 (0x20) to the id and pass that to beginTransmission. My device id was 0 and I passed 32 to beginTransmission
you have to send an even # of bytes. first is the lower 8 I/O pins. second is for the higher 8 I/O pins.
read is similar. here’s quick code
Wire.requestFrom(32, 2); // 2 bytes from device 0
char c = Wire.receive();
Serial.print(c, HEX); // print the character
you need to first write 1 to pins you would interested in reading from.
No public wish lists :(