if (Serial.available()>0) {digitalWrite(13, HIGH);}
}
The thing is:
I see the TX and RX lights flashing on the board meaning that there is communication going on.
I connected a scope on Pin 0 and ground and I can read the data that I am sending on this port. I can even decode it with the scope and it is proper data.
Why the Arduino is not lighting up the pin 13 LED?
If I force it on it will light up.
On my Mac I set the transmission to be 9600, 8, 0, n and handshake 0
I would love to be able to use the serial monitor for troubleshooting but I soon as I start it, I can't send anything from the computer. it says that the port is busy.
it would be nice if the serial monitor was "transparent".
It might be the problem with the pin 13 led. Try using another pin (don't use 0 and 1). Use pin 10 instead of 13. And connect an external led to pin 10 and run your sketch. You should get a confirmation.
Says here though that the default on the Arduino is 8n1.
I meant that the problem can be with the connection between the Led and pin 13.
I think that the problem is with pin 13. Led and output pin 13 are connected with eachother, but the chip's pin 13 isn't connected. That problem might be with the PCB soldering.
ArnavPawarAA:
I would say to the OP to make a continuity test between the chip and Led.
The simple way to do that is to blink the LED once or twice in setup()
Carib58:
I would love to be able to use the serial monitor for troubleshooting but I soon as I start it, I can't send anything from the computer. it says that the port is busy.
Do your initial testing with the Serial Monitor only.
If I just tell the LED to come ON, it will. its working.
I tested another output and it still doesn't work.
If I send something from the serial monitor, it works, the LED come ON.
The comm setting on the sender (my Mac) is bps 9600 bits 8 parity 0 stop bits 1
It could be a configuration issue on the sender but what confuses me is that I am not even asking for the Arduino to decode at this point. I am just asking to activate the output if it sees anything coming on the serial port.
int flag = 13;
void setup() {
pinMode(flag, OUTPUT);
Serial.begin(9600);
digitalWrite(flag, LOW);
}
void loop() {
if (Serial.available()>0) {digitalWrite(flag, HIGH);}
}
Is there another function that I can use instead? Even if it receive garbage?
I tested the sketch on an Uno. It works fine. The LED is off initially, I send some characters from the serial monitor and it turns on. Windows system here.
it would be nice if the serial monitor was "transparent".
aarg:
I tested the sketch on an Uno. It works fine. The LED is off initially, I send some characters from the serial monitor and it turns on. Windows system here.Just use a real terminal like Putty or Tera Term.
I know, I tested like that too.
But when I send from my Mac using another software, I get no results even if I see that the transmission occurred, looking at the TX RX lights, and measuring with my scope.
Arduino receives it, mirror it to Pin 0, but I can't make my program work.
If I just tell the LED to come ON, it will. its working.
I tested another output and it still doesn't work.
If I send something from the serial monitor, it works, the LED come ON.
The comm setting on the sender (my Mac) is bps 9600 bits 8 parity 0 stop bits 1
It could be a configuration issue on the sender but what confuses me is that I am not even asking for the Arduino to decode at this point. I am just asking to activate the output if it sees anything coming on the serial port.
int flag = 13;
void setup() {
pinMode(flag, OUTPUT);
Serial.begin(9600);
digitalWrite(flag, LOW);
}
void loop() {
if (Serial.available()>0) {digitalWrite(flag, HIGH);}
}
Is there another function that I can use instead? Even if it receive garbage?
You should use this function instead of Serial.available()
Serial.read() != "Elejakqlakn"
The junk text is just something random, but won't match with the garbage reicieved by the Arduino. Please test this.