I need some help with with I2c communication between two micro-controllers (Atmega 2560) lets call them "Arduino 1" and " Arduino 2 "
Due to"reasons" Arduino 1 will be programmed with flowcode however , "Arduino 2" has to be programmed using Arduino IDE.
I want to send multiple variables values from "Arduino 1" to "Arduino 2" using I2c (sda/scl pins) <all kind of sensors and outputs connected to arduino 1>
how can I do it ? , any kind soul out there can help me please
I2c communication between 2 Arduinos
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: I2c communication between 2 Arduinos
Hello,
Which device will be programmed with Flowcode? The master or the slave?
We have some helpful info on I2C available here.
https://www.matrixtsl.com/blog/simplifi ... c-and-spi/
I have created SPI slave devices in the past and use finite state machines to help perform the comms protocol.
https://www.flowcode.co.uk/wiki/index.p ... ateMachine
Which device will be programmed with Flowcode? The master or the slave?
We have some helpful info on I2C available here.
https://www.matrixtsl.com/blog/simplifi ... c-and-spi/
I have created SPI slave devices in the past and use finite state machines to help perform the comms protocol.
https://www.flowcode.co.uk/wiki/index.p ... ateMachine
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: I2c communication between 2 Arduinos
Thanks for your attention even though you seem busy
The master will be programmed using flowcode .
what I am trying to accomplish is to send a variable's value from one Arduino (Master) to another (slave).
I've seen the examples in the wiki and honestly I don't quite understand the send,recieve procedure, the value being sent is a whole port state while I need to send either individual bits or pull variable values from where ever they are stored and send them while being able to receive each variable value separately
sorry for any inconvenience I've caused and Thanks for your reply.
here's my poor attempt at i2c communication using 2 Arduino Mega (Both programmed with flowcode, need to know how it works here first )
The master will be programmed using flowcode .
what I am trying to accomplish is to send a variable's value from one Arduino (Master) to another (slave).
I've seen the examples in the wiki and honestly I don't quite understand the send,recieve procedure, the value being sent is a whole port state while I need to send either individual bits or pull variable values from where ever they are stored and send them while being able to receive each variable value separately
sorry for any inconvenience I've caused and Thanks for your reply.
here's my poor attempt at i2c communication using 2 Arduino Mega (Both programmed with flowcode, need to know how it works here first )
- Attachments
-
- slave22.fcfx
- (11.12 KiB) Downloaded 178 times
-
- Master.fcfx
- (11 KiB) Downloaded 169 times