firmata / arduino

Firmata firmware for Arduino
GNU Lesser General Public License v2.1
1.54k stars 516 forks source link

Using i2c and Firmata #90

Closed computersarecool closed 11 years ago

computersarecool commented 11 years ago

Maxuino now has i2c capability and I am beta testing it. In the GUI there is an option to select i2c as a pinMode, however I am not sure if you are supposed to select the master device's SDA and SCL or the Slaves (or both). But I also can't find any resources on how to use i2c with Firmata outside of Maxuino, in a sketch for instance.

soundanalogous commented 11 years ago

The i2c pinMode is for for the master device (an Arduino board). The slave would be the i2c device. Or are you trying to use Firmata i2c to create a communication link between 2 boards?

For a sketch you can look at StandardFirmata.

For an example of use in a firmata client see BreakoutJS or node-firmata. These are base-level i2c functions. You can also find higer level implementations in BreakoutJS and johnny-five.

computersarecool commented 11 years ago

I would like to be able to use Firmata i2c to communicate between two boards eventually but right now I am trying to use one device. Not quite sure how to configure i2c in Maxuino. Do you know how I could setup my board and i2c device (EEPROM or ADXL-345 or whatever) using the Maxuino GUI? It seems like I would need to set up the board and device. (I am using configurable Firmata by the way)

screen shot 2013-10-09 at 3 28 17 pm

soundanalogous commented 11 years ago

I'm not sure since I have never used Maxuino and have not used Max/MSP for several years. Your best bet is to try to get in touch with Chris Coleman who is the creator of Maxuino. I don't see a forum on the Maxuino website.

computersarecool commented 11 years ago

Ah yes, I have been in contact with Chris. I am not even sure if i2c is up and running on Maxuino yet but will check and could update this post when I know. Thank you for all your work on Firmata- I think it is the best thing to happen to Arduino. I have used it in oFX and Processing and now Max. Unfortunately I am still having some difficulties understanding how the protocol functions. The wiki is a bit advanced- do you have any suggestions on how/where I could learn how to implement all of Firmata's capabilities (and how it does what it does)?

soundanalogous commented 11 years ago

Best thing you can do is look over the various Firmata client implementations: http://firmata.org/wiki/Download. Some are more complete than others and not all fully support the latest version of the protocol. The libraries that I know of that offer full or near full support are:

node-firmata + johnny-five perl-firmata BreakoutJS

soundanalogous commented 11 years ago

closing this because it is not an issue with the firmata/arduino implementation