Hi Graham + William,
thank you for getting back to me so quickly.
The device I'm trying to communicate with is this motor controller:
It's made for the Raspberry PI, but I don't see any reason for it not to work with the Beaglebone Blue.
With the help of an RPi I've been able to confirm that the device is in full working condition.
Now, let's have some fun:
tkurbad@beaglebone:~$ i2cdetect -y -r 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
0x44 is the correct default address for the PicoBorgRev.
(Just to have that out of the way: User tkurbad is a member of the 'i2c' group.)
Now, let's try to read the board ID, i.e. version:
tkurbad@beaglebone:~$ i2cget -y 1 0x44 0x99
0x00
This should return 0x15 instead.
Set motor A spinning forward:
tkurbad@beaglebone:~$ i2cset -y 1 0x44 6 255
Motor is spinning full throttle now.
Read motor PWM setting:
tkurbad@beaglebone:~$ i2cget -y 1 0x44 8
0x00
Should return 0xff now.
Turn off motor A:
tkurbad@beaglebone:~$ i2cset -y 1 0x44 6 0
Motor shuts off.
i2cdump behaves the same as all other read operations. At least some of the values should be != 0x00:
tkurbad@beaglebone:~$ i2cdump -y 1 0x44
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
I've also got some Python3 code that behaves exactly the same (writes to the device work flawlessly, while reading always returns 0x00):
Any ideas what I may be doing wrong here?
Best,
Torsten