0

When using UART in ArduinoIDE, ArduinoIDE uses a preset pin number for RX and TX for UART, and when using a board like ESP32 which has RX/TX pins preset it's fine.

What do you do when a board does not have any preset RX/TX pins but instead allows UART on all GPIO pins? how do you set the RX/TX pins in ArduinoIDE?

(The board I wanna use UART with is the NRF51822)

  • I’d suggest you look at the Arduino core code for the nrf51, not the IDE. Usually it is set in the Boards.txt file or as an option in the Serial.begin() method. – Kartman May 01 '22 at 22:43
  • You might be able to do Serial.setPins(rx,tx); before Serial.begin(); The default pin are set in the file variant.h under the variant directory for the board you’ve selected. You’ll need to find where the core files are stored. A Google should find that for your computing platform. – Kartman May 01 '22 at 22:54

0 Answers0