I am brand new to Arduino. I have a Nano. I am using the following code...
#include <SoftwareSerial.h>
SoftwareSerial CTDSerial(0, 1); // RX, TX
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(0,INPUT);
pinMode(1,OUTPUT);
CTDSerial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
if(CTDSerial.available()) {
Serial.println(CTDSerial.read());
delay(1000);
CTDSerial.flush();
}
}
I am trying to read a serial sensor that outputs a string of data every second. Using the serial monitor I can see a single line of data each time I open a new window, but it won't update. I have looked through the forums and online and cannot find an answer.
Also, I have seen some posts and information alluding to the fact that only the 0 and 1 pins can read serial data. Is this correct, or can I use other pins to read multiple sensors?