Send data from arduino to arduino


Is there any way i can send data from arduino to arduino?
My goal is to send Number of steps from the sender to the receiver

the stepper motor is connected to the receiver and i want it to received the numbers of steps it should do from the sender.

the code im working on makes the stepper rotate slowly. Its working as I wanted but the only problem is that its slow… that why im thinking of putting another arduino only for the stepper

this is a part of the code that handles the stepper… RPM_MS (ms) is the wind speed im getting and by that makes the stepper move to a position according to the wind speed

degreeA saves previous steps it made
stepper.startRotate(degreeA[j]); make the stepper rotate according to the number of steps degreeA[j]
*void motorpos()
unsigned wait_time_micros = stepper.nextAction();
if (wait_time_micros <= 0) {
    if (wait_time_micros > 100){

void move_pos()

if (ms>12){

if ((ms/12)*16500 > 4500 || (ms/12)*16500 <= 0){
  pos = (ms/12)*16500;
} else {
  pos = 0;

if(pos-prevpos != 0){

degreeA[i] = pos-prevpos;


if (degreeA[j]!=0 && stepper.nextAction() == 0 ){


if (j == 19 && stepper.nextAction() == 0){
  memset(degreeA, 0, sizeof(degreeA));

//degreeA[0] = (char)0;



thank you!

first result on google

It is not hard to send data from one Arduino to another but you may not need a second Arduino. You have not posted ALL of your code so I cannot help.

If your code contains delay(...), this may be part of your problem.

There are other potential issues.

the code does not contain any delay functions..

heres the code


The following diagram shows various wired ways of exchanging data between two Arduinos. Make your choice.

Figure-1: Possible wired communication links for exchanging data between two Arduinos


heres the code

Seems you forgot it....

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(','); // comma separator
Serial.println('>'); // end marker


Sorry about the code..didnt upload

lcd - Sending a value from one arduino to another - Arduino Stack Exchange

first result on google

it dosent work.. i dont know why but the receiving end show only a number 10 or 0