Pages: 1 [2]   Go Down
Author Topic: Multiple max 485 communicatio  (Read 1142 times)
0 Members and 1 Guest are viewing this topic.
DELHI
Offline Offline
God Member
*****
Karma: 7
Posts: 714
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Present code : 1 master and 2 slave.

out put file attached as below.
page1: without second slave connected. out put from Serial monitor slave1
page2: with both slave connected and  changes in out put slave1


master:
Code:


void setup() {
 
  Serial.begin(9600);

}


void loop()
{
  Serial.println("WELCOME ARDUINO UNO");
  Serial.write("UNO IS WRITING");
  delay(1000);
}


Slave1 and slave2
Code:


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

}

void loop() {
   
Serial.println("slave1 is running");// used in salve 1 program
Serial.println("slave 2 is running");// used in slave 2 program
String content = "";
  char character;
  while(Serial.available()) {
      character = Serial.read();
      content.concat(character);
   
  }
 
 Serial.println(content);
 delay(1000);
 
}


* 1MASTER2slave.pdf (243.69 KB - downloaded 9 times.)
Logged

AMPS

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 284
Posts: 25580
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can I suggest you stop posting PDFs that don't open?
You're wasting my bandwidth.

Just cut and paste from your terminal window into a quote box.

Why are you using "String" in your receiver?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

DELHI
Offline Offline
God Member
*****
Karma: 7
Posts: 714
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset




Quote
Can I suggest you stop posting PDFs that don't open?
You're wasting my bandwidth.

Just cut and paste from your terminal window into a quote box.

Why are you using "String" in your receiver?
i tried to insert quote , But it didn't worked for me since  i could not able to cut it from terminal window . i wanted put image but they are 2 mb file . SO i am putting PDF file.
Logged

AMPS

Pages: 1 [2]   Go Up
Jump to: