When testing from Lazarus I see the 'RX' and 'L' led's on the nano flicker but the led does not come on and stay on. I have tried changing baud rates, no luck. Can use some help in how best to move forward with this please.
Maybe I'm daft when it comes to Arduino programming... but aren't the RX and TX just for indicating data transmission??
HI @rvk to clarify things:
On an Arduino board, the RX and TX LEDs indicate activity on the serial communication lines:
RX (Receive): This LED blinks when the Arduino is receiving data from an external device (such as your computer) via the serial port. It monitors incoming data on the RX pin of the microcontroller.
TX (Transmit): This LED blinks when the Arduino is sending data to an external device. It indicates activity on the TX pin, which is used for transmitting data from the Arduino.
They don't stay on !! Those are not the leds you are controlling with that code.
I am aware of this and thank you for clarifying.
These LEDs are especially useful for debugging, as they give a visual indication of serial communication happening between your Arduino and other devices (like your computer or sensors).You control pin 13 (or whatever value you have in LED_BUILTIN) and you need to connect a led to that pin to see if it keeps on or blinks. So the leds for RX and TX are of no interest for you (other than knowing something is transmitted at that point).
The RX and TX leds tell me that when I click a button in the ide my data has come across the serial port to the arduino and vice versa. So actually they are of great interest to me :-) and no your definitely not daft either.