Sending data between two MCUs

Hello good people? Hope I found you well.

I need help here, am not good in programming but if hinted will do my best.

I have two Arduino Nanos, I will name them 'Alfa' and 'Bravo', powered with one power supply (5v).

Alfa is analog reading 4 sensors.
Bravo is also analog reading 4 sensors and printing to the LCD.

Is it posible for Alfa to send it's analog read data to Bravo and Bravo do the LCD printing of received data and it's own read data?

I need a wired connection method.

If posible what's the best way to do it?

Thanks.

Yes.

If posible what's the best way to do it?

Use a serial connection RX/TX

Thanks @jim-p , will go for that, when the going gets tough I will come back for help.

If you want to use Serial Monitor for feedback while debugging, it gets more complex. With Nanos, you only have one serial hardware connection.
Best approach? Work out the interaction for one nano using SM, then work out the other using SM, and only when they're both working well, connect RXA - TXB and TXA - RXB, A and B being the designators for your two Nanos.
Search the forum for Serial Basics for more hints.

1 Like

So why do you need 2 Nanos?

If you used 1 Nano, you save yourself a Nano and you save yourself the problems of sending data between the Nanos.

Does the LCD have an i2c backpack which blocks 2 of the analog pins?

1 Like

If Alfa is less than 1 meter from Bravo, I would use I2C communication. Bravo would be the master and Alfa the slave.
Don't worry if the LCD communicates via I2C, I2C supports up to 127 devices.

1 Like

As @PaulRB suggested, a classic Nano has eight analogue inputs.
So why do you think you need a second Nano.

If A4, A5 are used for the LCD's I2C backpack, then I still wouldn't use a second Nano.
A 74HC4067 (16 channels) or 74HC4051 (8 channels) breakout board is a much easier solution.
Leo..

Another alternative could be ads1015/ads1115 or similar to add extra analog inputs via i2c.

That could be a better or a worse solution, depending on what OP is measuring.
This seems like a typical XY problem.
Leo..

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.