Hi there - Just wondering if anyone can suggest the easiest way to communicate directly with i2c devices using Pure Data on a Raspberry Pi? I’m using pd-l2ork and can communicate with the GPIO pins no problems using the GPIO object but not quite sure how to communicate with i2c devices.
thanks in advance,
s s
-
Raspberry Pi and i2c
-
Since I2C is a protocol you probably need to figure out how to communicate within this protocol. I don't really know how to do this since I've only used I2C devices with I2C libraries on the Arduino. Maybe the Arduino is an easy solution, but if you don't want to add extra hardware, maybe there is some python code around that can do the work for you, and then communicate with Pd via pdsend and [netreceive]. Just an idea..
-
@alexandros Thanks very much for your reply.
I had thought of going via python, but I guess I was hoping there was a more direct solution . . .
Whilst googling for clues, I read on the iem site that pd-L2ork “offers seamless interfacing with Nintendo controllers, Arduino, and Raspberry Pi's GPIO (including PWM) and i2c interfaces."
I have found connecting to Wiimotes, arduinos and gpio pins with pd-l2ork well documented and straight forward but the i2c part isn’t so obvious.
anyway for the task at hand I might use an arduino as you suggest.
many thanks,
s s -
You could also send to the mailing list as the developer of Pd-L2ork is in there so he can give you some guidance...
-
Did you try the object mentionned in this topic : http://forum.pdpatchrepo.info/topic/9966/i2c-external ?
I wrote an abstraction months ago, it was dedicated to ADC reading but it could be inspiring : http://forum.pdpatchrepo.info/topic/8650/arm-cubieboard-externals-gpio-and-i2c . What kind of task would you like to perfom?
Nau
-
Hi..as per my knowledge I2C is a protocol you probably need to figure out how to communicate within this protocol. I don't really know how to do this since I've only used I2C devices with I2C libraries on the Arduino. Maybe the Arduino is an easy solution, but if you don't want to add extra hardware,