I have Arduino Uno I want send data from my Arduino Uno to Window PC.
I am using Tera Term on my PC to receive data from Arduino Uno
Tera Term settings
Port: COM3
Data : 8 bits
Parity : none
Stop Bit : 1
control flow : none
#include <SoftwareSerial.h>
SoftwareSerial mySerial(0, 1);
void setup() {
// Set the baud rate for the SerialSoftware object
mySerial.begin(9600);
}
void loop() {
// Send a byte with the value 45
mySerial.write(45);
}
When I upload sketch and check Tera Term I don't receive data on Tera Term.
The Uno is using pin 0 and 1 for Hardware Serial.
Furthermore this Hardware Serial pins are also connected via an USB chip to upload the sketch.
You can use this Hardware Serial also to communicate with your PC.
So it does not make sense to use 0 and 1 for SoftSerial.
Print to Hardware Serial and check with the built in Serial Monitor of the Arduino IDE if you receive your minus sign.
Either use 0 and 1 with the existing Hardware Serial ("Serial") or use other pins for SoftSerial.
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.print("Hello World");
}
void loop() {
// put your main code here, to run repeatedly:
}