Im very new so please be gentle. Ive just received mu DEV-12460 and Im using platformio as my SDK. Im trying to load and control the TX and RX leds using the example code. My confusion is the mention of a macro to control the TX LED. I don’t see any code for TXLED1 or TXLED0 . This is the copied code Sparkfun said I should use
/* Pro Micro Test Code
by: Nathan Seidle
modified by: Jim Lindblom
SparkFun Electronics
date: September 16, 2013
license: Public Domain - please use this code however you’d like.
It’s provided as a learning tool.
This code is provided to show how to control the SparkFun
ProMicro’s TX and RX LEDs within a sketch. It also serves
to explain the difference between Serial.print() and
Serial1.print().
*/
int RXLED = 17; // The RX LED has a defined Arduino pin
// Note: The TX LED was not so lucky, we’ll need to use pre-defined
// macros (TXLED1, TXLED0) to control that.
// (We could use the same macros for the RX LED too – RXLED1,
// and RXLED0.)
void setup()
{
pinMode(RXLED, OUTPUT); // Set RX LED as an output
// TX LED is set as an output behind the scenes
Serial.begin(9600); //This pipes to the serial monitor
Serial.println(“Initialize Serial Monitor”);
Serial1.begin(9600); //This is the UART, pipes to sensors attached to board
Serial1.println(“Initialize Serial Hardware UART Pins”);
}
void loop()
{
Serial.println(“Hello world!”); // Print “Hello World” to the Serial Monitor
Serial1.println(“Hello! Can anybody hear me?”); // Print “Hello!” over hardware UART
digitalWrite(RXLED, LOW); // set the RX LED ON
TXLED0; //TX LED is not tied to a normally controlled pin so a macro is needed, turn LED OFF
delay(1000); // wait for a second
digitalWrite(RXLED, HIGH); // set the RX LED OFF
TXLED1; //TX LED macro to turn LED ON
delay(1000); // wait for a second
}
I’ve also seen comments in https://github.com/Arduboy/Arduboy/issues/76 that TXLED is pin 30 but that doesn’t work . It also states:
Note that, contrary to that article, you can control TXLED as digital Pin 30 (like RXLED is Pin 17). And there are #define LED_BUILTIN_RX 17 and #define LED_BUILTIN_TX 30 available. I think this was added in Arduino version 1.5+
Both those decalres don’t appear to be available
Can someone help a noob please