arduino icon indicating copy to clipboard operation
arduino copied to clipboard

Firmata protocol as I2C Slave

Open EMonatko opened this issue 11 months ago • 3 comments

Hi,

Does the protocol support I2C slave mode? Can I configure my Arduino as a slave using this Firmata?

Thanks in advance!

EMonatko avatar Dec 17 '24 14:12 EMonatko

No, that is currently not possible. Typically an Arduino using Firmata is used to control sensors from a PC, so this seems to be a strange requirement. What is your use case?

pgrawehr avatar Dec 19 '24 08:12 pgrawehr

I'm my case i need to receive from specific sensor data just to check if my i2c cables are working correctly

EMonatko avatar Dec 19 '24 08:12 EMonatko

There should be easier ways to achieve this. The best solution of course would be to use an oscilloscope. And you can start out by doing the standard I2C bus scan (available as an example in Arduino IDE). That way you can see whether the sensor responds.

pgrawehr avatar Dec 19 '24 08:12 pgrawehr

And you can start out by doing the standard I2C bus scan

I think doing so is interrupting I2C communication with devices currently working, so it's very dangerous! Because the "scanning" is based on: WRITING to each address to test each. See: https://learn.adafruit.com/scanning-i2c-addresses/arduino

PizzaProgram avatar Apr 14 '25 18:04 PizzaProgram

@PizzaProgram Sure, but if you just want to test whether the cabling is ok, that's the way to go. Obviously, communication has not been established (and thus the devices aren't initialized) when you start up and first want to verify whether the hardware is operational and connected.

pgrawehr avatar Apr 15 '25 06:04 pgrawehr