LEDS/Buttons
Last updated
Last updated
There are several LEDs and Buttons on the processor board of the Macchina M2. These are user programmable and can be used for many applications.
M2 has 5 single-color LEDs and 1 RGB LED. Each LED is active LOW - the processor needs to pull the pin LOW to turn on the LED.
The following table shows what LEDs correspond to what Pin name.
For example, if you want the Green LED to blink, this sketch will do that for you:
M2 has 4 buttons on the Processor board.
2 of these buttons (Button1 and Button2) are user-programmable. Use these for triggering something in your program. For example, this code turns on the Red LED when Button 1 is pressed:
RESET button will reset the processor.
ERASE button is used in conjunction with the RESET button. In the event your program hangs or there is some other issue, power up M2, hold down ERASE and then press and release RESET. This will erase the flash on the processor.
LED
Mapped Pin Name
DS2 (RED)
DS2
DS3 (YELLOW)
DS3
DS4 (YELLOW)
DS4
DS5 (YELLOW)
DS5
DS6 (GREEN)
DS6
RGB RED
DS7_RED / RGB_RED
RGB GREEN
DS7_GREEN / RGB_GREEN
RGB BLUE
DS7_BLUE / RGB_BLUE