class Led { //Light Emitting Diode class public: //Public methods Led(int pin); //Constructor to create an LED object. The LED is connected to the specified pin. void on(); //Method to turn on the LED void off(); //Method to turn off the LED void flash(int onTime, int offTime); //Method to flash the LED on and of for the specified times in milliseconds private: //Private methods int _pin; //The DIO pin is connected to the anode of the LED. The cathode of the LED is connected to ground. }; Led::Led(int pin) { //Constructor to create an LED object. The LED is connected to the specified pin. _pin = pin; //Save the DIO pin pinMode(_pin, OUTPUT); //Configure the DIO pin as an output off(); //Turn off the LED intially } void Led::on() { //Method to turn on the LED digitalWrite(_pin, HIGH); //Turn on the LED by setting the DIO pin high } void Led::off() { //Method to turn off the LED digitalWrite(_pin, LOW); //Turn Off the LED by setting the DIO pin low } void Led::flash(int onTime, int offTime) { //Method to flash the LED on and off for the specified times in milliseconds on(); //Turn on the LED delay(onTime); //Wait for the on time off(); //Turn off the LED delay(offTime); //Wait for the off time } Led rxLED(17); //Create an LED object and assign pin 17 (the Pro Micro RX pin) to it // This setup function runs once when you press reset or power up the board void setup() { //Nothing to set up } // This loop function runs continuously after set up void loop() { rxLED.flash(100,100); //Flash the LED on for 100 mS and off for 100 mS }