Go Down

Topic: Multiple max 485 communicatio (Read 1 time) previous topic - next topic

AMPS-N

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: [Select]



void setup() {

  Serial.begin(9600);

}


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



Slave1 and slave2
Code: [Select]



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);
 
}

AMPS

AWOL

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?
"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.

AMPS-N




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.
AMPS

Go Up