Nano Rouge Values over Tx/Rx

so what i am doing is sending data through TX/RX from a Arduino Minima to a Arduino NANO
i am getting data from the Minima into the NANO but i have a Rouge 1 showing up, i have included both Programs and result of my Serial Monitor, any Help would be great.

// Arduino Minima
void setup() {
  

  Serial1.begin(19200);
}

void loop() {
  int value1 = 2;
  int value2 = 3;
  Serial1.print(value1);
  Serial1.print(",");
  Serial1.print(value2);

  digitalWrite(LED_BUILTIN, HIGH);
  delay(20);
   digitalWrite(LED_BUILTIN,LOW);
  delay(20);
  }
// Arduino Nano 
/*
RX is digital pin 3 (connect to TX of other device)
TX is digital pin 4 (connect to RX of other device)
*/

#include <SoftwareSerial.h>
SoftwareSerial mySerial(3, 4); // RX, TX

void setup()
{
  pinMode(LED_BUILTIN, OUTPUT);      // set LED pin as output
  digitalWrite(LED_BUILTIN, LOW);
  Serial.begin(19200);

  while (!Serial) {
  }

 // Serial.println("Goodnight moon!");

  mySerial.begin(19200);
 // char receivedData = mySerial.read();
 // mySerial.println("Hello, world?");
}

void loop() {

   if (mySerial.available()) { 
         digitalWrite(LED_BUILTIN, HIGH);
            Serial.write(mySerial.read()); // Forward data from mySerial to Serial 
            Serial.println(mySerial);

        } 
        if (Serial.available()) { 
            mySerial.write(Serial.read()); // Forward data from Serial to mySerial 
        } 
    }     
 

Serial Monitor NANO

I think that should be just Serial.println(); ?

1 Like

Hi @0nxrefinery ,

how about changing the Minima code to

  Serial1.print(value1);
  Serial1.print(",");
  Serial1.println(value2);

and the Nano code to

   if (mySerial.available()) { 
           digitalWrite(LED_BUILTIN, HIGH);
           Serial.print(mySerial.read()); // Forward data from mySerial to Serial 
        } 

That should do it ...
ec2021

i got it Solved , i got it into a Char and it works Fine :)
thanks everyone for the Help

---- Changed Minima Code --------

/*
RX is digital pin 3 (connect to TX of other device)
TX is digital pin 4 (connect to RX of other device)
*/

#include <SoftwareSerial.h>
SoftwareSerial mySerial(3, 4); // RX, TX
char mystr;

void setup()
{
  pinMode(LED_BUILTIN, OUTPUT);      // set LED pin as output
  digitalWrite(LED_BUILTIN, LOW);
  Serial.begin(19200);
  
  while (!Serial) {
  }

 // Serial.println("i can taste the moon!");

 mySerial.begin(19200);

}

void loop() {
  if (mySerial.available() > 0){
    mystr = mySerial.read();
    Serial.print(mystr);
  }
}


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.