Connecting Multiple Floras via I2C

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dukeeagle
 
Posts: 6
Joined: Thu Jun 22, 2017 5:43 pm

Connecting Multiple Floras via I2C

Post by dukeeagle »

I'd like to use both the bluetooth module and GPS module with my Flora project, but there's only one RX and TX port on the main board. If I had two Floras, would it be possible to connect one module to each of the two Flora boards, and then connect the two boards via I2C like you can do with normal Arduinos? A master-slave connection like that would allow for a single Flora to harbor the GPS information and still transmit it via Bluetooth, all while having enough ports for both modules.

I've used the Wire library in the past for an Arduino Uno. Is there any way to do this with the Flora, while also allowing room for a different RX and TX connection to happen on each board?

Thanks!

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: Connecting Multiple Floras via I2C

Post by adafruit_support_bill »

Yes, it would be possible to communicate master/slave via i2c between Flora boards.

User avatar
dukeeagle
 
Posts: 6
Joined: Thu Jun 22, 2017 5:43 pm

Re: Connecting Multiple Floras via I2C

Post by dukeeagle »

Great! Could you provide a wiring guide for that? I can't find one for Flora anywhere.

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: Connecting Multiple Floras via I2C

Post by adafruit_support_bill »

Wiring is the same as for an Arduino - only the pins are in different locations.
Connect:
GND->GND
SDA->SDA
SCL->SCL

https://www.arduino.cc/en/Tutorial/MasterReader
https://www.arduino.cc/en/Tutorial/MasterWriter

User avatar
dukeeagle
 
Posts: 6
Joined: Thu Jun 22, 2017 5:43 pm

Re: Connecting Multiple Floras via I2C

Post by dukeeagle »

Thank you so much! That's super helpful.

User avatar
adalloul92
 
Posts: 3
Joined: Fri Jun 23, 2017 4:01 am

Re: Connecting Multiple Floras via I2C

Post by adalloul92 »

can I do the communication between a feather and an Arduino Mega or Uno?

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: Connecting Multiple Floras via I2C

Post by adafruit_support_bill »

Yes, you can communicate between them. But keep in mind that the Floras and Feathers are 3.3v devices and the UNOs and Megas are 5v devices. Either make sure that all bus pullups are pullups to 3.3v only - or use an 'i2c-safe' level-shifter: https://www.adafruit.com/product/757

Locked
Please be positive and constructive with your questions and comments.

Return to “Wearables”