firmata / arduino

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

I2c scanner support feature request #228

Open ubIQio opened 8 years ago

ubIQio commented 8 years ago

It would be useful if a firmata host could enumerate attached i2c devices on a firmata client.

A full scanner is not required, just the ability to detect the error from a wire.endtransmission .

cf i2cdetect, http://playground.arduino.cc/Main/I2cScanner and http://www.gammon.com.au/i2c

Apologies if this feature already exists , but could not find it...

soundanalogous commented 8 years ago

It does not exist but it would be low priority since you could simply run either of the above 2 examples to get the i2c address. What is the need to discover the i2c address remotely?

soundanalogous commented 8 years ago

I could consider this for Firmata 3.0. I plan to make changes to the Firmata i2c implementation in that release in order to support the ability to have multiple i2c ports so it will be easier to add it then as the current implementation does not scale well.

ubIQio commented 8 years ago

It would be really handy in an environment where I2C devices could be hot plugged like Arduinos new Eslov, https://blog.arduino.cc/2015/10/12/come-and-meet-arduino-team-in-rome/, and

Pimoroni Flotilla devices, https://www.kickstarter.com/projects/pimoroni/flotilla-for-raspberry-pi-making-for-everyone/description

or if a given system had different build options like Ardhat https://ardhat.com

It would be very inconvenient to unload firmata , run I2c scanner sketch and reload firmata, just for the want of a error return message.

On Tuesday, 13 October 2015, Jeff Hoefs <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

It does not exist but it would be low priority since you could simply run either of the above 2 examples to get the i2c address. What is the need to discover the i2c address remotely?

— Reply to this email directly or view it on GitHub https://github.com/firmata/arduino/issues/228#issuecomment-147618969.

Jonathan Peace

ubIQio - Smart IO, everywhere https://ubiqio.com

ubIQio Limited, Registered office: One New Street, Wells, BA5 2LA, Registered in England & Wales, Company No: 9450308

ubIQio commented 8 years ago

Thanks Jeff.

Jonathan Peace

ubIQio - Smart IO, everywhere https://ubiqio.com

ubIQio Limited, Registered office: One New Street, Wells, BA5 2LA, Registered in England & Wales, Company No: 9450308

On Tue, Oct 13, 2015 at 7:48 AM, Jeff Hoefs notifications@github.com wrote:

I could consider this for Firmata 3.0. I plan to make changes to the Firmata i2c implementation in that release in order to support the ability to have multiple i2c ports so it will be easier to add it then as the current implementation does not scale well.

— Reply to this email directly or view it on GitHub https://github.com/firmata/arduino/issues/228#issuecomment-147622127.

scottgonzalez commented 8 months ago

Any update on this?

pgrawehr commented 8 months ago

@scottgonzalez This is actually an old ticket, but I think it should be closed as this is working fine. I can do a I2C bus scan from the host without any problems. See https://github.com/dotnet/iot/blob/main/src/devices/Board/I2cBusExtensions.cs#L26 for a possible client implementation.