Communication between two arduinos

Hi,

im working on a projekt and im having a problem.

So i have a Wemos D1 R2 & mini and a arduino nano. The arduino nano bassicly just has a 4 digit screen attached and i want to send a number from the wemos to the nano so that it can display that number.

thank you in advance

greetings Simon

(deleted)

read the bottom half of my signature and come back with a question

If you are using a serial connection between the Wemos and the nano then have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.

The technique in the 3rd example will be the most reliable. It is what I use for Arduino to Arduino and Arduino to PC communication.

You can send data in a compatible format with code like this (or the equivalent in any other programming language)

Serial.print('<'); // start marker
Serial.print(value1);
Serial.print(','); // comma separator
Serial.print(value2);
Serial.println('>'); // end marker

...R

simgamer3:
So i have a Wemos D1 R2 & mini and a arduino nano. The arduino nano basically just has a 4 digit screen attached and i want to send a number from the wemos to the nano so that it can display that number.

Why are you using an Arduino Nano?

It makes much more sense and easier to code to have the WeMOS control the display directly.

Robin2:
If you are using a serial connection between the Wemos and the nano then have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.

The technique in the 3rd example will be the most reliable. It is what I use for Arduino to Arduino and Arduino to PC communication.

You can send data in a compatible format with code like this (or the equivalent in any other programming language)

Serial.print('<'); // start marker

Serial.print(value1);
Serial.print(','); // comma separator
Serial.print(value2);
Serial.println('>'); // end marker




...R

Thanks i will try it

Paul__B:
Why are you using an Arduino Nano?

It makes much more sense and easier to code to have the WeMOS control the display directly.

the wemos im using does not have enough pins to keep the display running and a rotary encoder at the same time


Two pins for the I2C display and three for the rotary encoder (which you failed to mention). What's the problem?

i dont have a i2c display i have a basic 4 digit display wich needs 12 pins

simgamer3:
i don't have a i2c display i have a basic 4 digit display which needs 12 pins

A 4 digit display requires two data pins.

Stop mucking about. Get the right parts to do the job.

Your suggestion of using an Arduino Nano to drive a display poorly (because you have to code for the multiplexing yourself and argue over how choose resistors to limit the current to within the Arduino's safe limits - a frequent topic here) will prove a lot more tedious than using a display module designed for the purpose.

Paul__B:
Stop mucking about. Get the right parts to do the job.

I can understand a desire to do a job with the parts that happen to be available.

...R

Given that it takes so long to get them from China. :roll_eyes: Yes, I realise that.

You can have it soon, reliable, cheap. Choose any two! :astonished: