Send Arduino A data to Arduino B and combine these data

Hello all.
I want to try combining sensor data from Arduino A to Arduino B but Arduino B also has sensor data itself and I want to combine it from the two data. Then the data will be displayed to the monitor serial via Arduino B.

can all of you help me. any help is very useful for me.

Hello
How do Arduino A and Arbuino B talk to each other?
Which physical interface is used ?

Hi, @friendy
Welcome to the forum.

Please read the post at the start of any forum , entitled “How to use this Forum”.
OR

  • What model Arduinos?
  • How far apart are they?
  • What are the sensors?
  • What sort of data? (analog/digital)

Thanks… Tom… :grinning: :+1: :coffee: :australia:

I use serial sofware

show your sketch in code tags </>

Not sure what you are stuck with. It should be straight forward but maybe you did not provide all details that we need to understand the exact problem.

i don’t know the english proverb for “sich alles aus der Nase ziehen”. :grinning:

HI,
Please read the post at the start of any forum , entitled “How to use this Forum”.
OR

Then look down to “code problems” about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post an EXPORT of your circuit from your CAD, it will be easier to read?
How far apart are they?

Thanks Tom… :grinning: :+1: :coffee: :australia:

program Arduino A
#include <SoftwareSerial.h>
#include “HX711.h”

#define calibration_factor 18029.57
#define calibration_factor1 18030.57
#define DOUT 5
#define CLK 6
#define DOUT1 7
#define CLK1 8

SoftwareSerial slave(3,4); //Rx tx

String weight1;
String weight;
HX711 scale;
HX711 scale1;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
slave.begin(9600);

scale.begin(DOUT, CLK);
scale.set_scale(calibration_factor);
//This value is obtained by using the SparkFun_HX711_Calibration sketch
scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0
scale1.begin(DOUT1, CLK1);
scale1.set_scale(calibration_factor1);
scale1.tare();
}

void loop() {

weight=scale.get_units()/2;
weight1=scale1.get_units()/2;

String data = (String (weight) + “#” + (weight));
slave.println(data);
Serial.println(data);
delay(500);
}
program Arduino B
#include <SoftwareSerial.h>
#include “HX711.h”

#define calibration_factor 18029.57
#define calibration_factor1 18030.57
#define DOUT 5
#define CLK 6
#define DOUT1 7
#define CLK1 8

SoftwareSerial slave(3,4); //Rx tx

String weight;
String weight1;
HX711 scale;
HX711 scale1;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
slave.begin(9600);

scale.begin(DOUT, CLK);
scale.set_scale(calibration_factor);
//This value is obtained by using the SparkFun_HX711_Calibration sketch
scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0
scale1.begin(DOUT1, CLK1);
scale1.set_scale(calibration_factor1);
scale1.tare();
}

void loop() {

weight=scale.get_units()/2;
weight1=scale1.get_units()/2;

String data = (String (weight) + “#” + String(weight1)+ “#” + void (sender1));
slave.println(data);
Serial.println(data);
delay(500);
}
void sender1 (){
if(Serial.available() > 0);{
char inByte = Serial.read();
}

}

sorry i am new to this forum

Hi,
Thanks for the formatted code. :+1:

What CAD are you using for your schematic?
It should have under the FILE tab a function to EXPORT your schematic image as a jpg, without all the tool bars and in a resolution to make it readable.

How far apart are the two UNOs?

Tom… :grinning: :+1: :coffee: :australia:

or the second distance unos not too far … my goal is only to combine data from uno A and UNO B

Hi,

“Not to far”, here in Australia that can be a 100kms.

  • How far?
  • What is the application?
  • What environment will it be used in?

All these questions are important so we can suggest a suitable comms system.

In your circuit you will need to connect the gnd of both UNO together.

Tom… :grinning: :+1: :coffee: :australia:

I believe it would involve an orifice at the other end. :roll_eyes: