The QT Py does not have an onboard red LED like so many other boards. We just didn't have any room! Instead, though, you get a very tiny RGB NeoPixel which you can use to give visual feedback.

To use it, first install the NeoPixel library

This example will get you started!

#include <Adafruit_NeoPixel.h>

// create a pixel strand with 1 pixel on PIN_NEOPIXEL
Adafruit_NeoPixel pixels(1, PIN_NEOPIXEL);

void setup() {
    pixels.begin();  // initialize the pixel
}

void loop() {
    // set the first pixel #0 to red
    pixels.setPixelColor(0, pixels.Color(255, 0, 0));
    // and write the data
    pixels.show();
  
    delay(1000);
    
    // turn off the pixel
    pixels.clear();
    pixels.show();
  
    delay(1000);
}

This guide was first published on Sep 30, 2020. It was last updated on Jun 20, 2024.

This page (NeoPixel Blink) was last updated on Mar 08, 2024.

Text editor powered by tinymce.