Class Leds

Class Documentation

class Leds

A class specifically for handling the wrapping of the digital pins connected to LEDs on the RoboMaster development board.

Public Types

enum LedPin

The LEDs correspond to the color on the RoboMaster type C board.

Values:

enumerator Green
enumerator Red
enumerator Blue

Public Functions

Leds() = default
mockable ~Leds() = default
mockable void init ()

Initializes the LEDs by putting the pins in output mode and settting all the pins to low.

mockable void set (LedPin pin, bool isSet)

Sets a given led to either high or low.

Note

setting an LED to high (isSet=true) will turn the LED off and setting an LED to low (isSet=false) will turn the LED on.

Parameters:
  • pin[in] the LED to set

  • isSet[in] true if you want to turn the LED off, false if you want to turn the LED on.