Did you tie all address lines to gnd?
Do you have a shared gnx with the IOIO?
Do you have pull ups on both i2c lines?
Did you try a read transaction to see what you're getting?
Unrelated:
1. Allocate buffers once.
2. No need for rx buffer if you're not receiving. Null if fine.
--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
writeRead() will do exactly what you want.
No. The last bit is r/w, and is not considered part of the address in this context. The writeRead operation will do a write-followed-by-read transaction, exactly like the one described in the datasheet for reading values.
Here is where I get confused... According to datasheet, the address of the chip (with two pots) should be 0101 (control code) + 000 (all adress lines to gnd) + R/W byte = 0x50. However, according to your explanations in this forum, IOIO lib skips the last bit so the actual address sent should be divided by two - 0x28 (it is the same with the Wire lib in Arduino). However, in order to read pots, I would need to change the last bit to 1 = 0x51. Is this the address I should use then?
--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.
Exactly like that. You can pass in null as the response if you want, but a zero length response is executed as a write only transaction.