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); }
Page last edited March 08, 2024
Text editor powered by tinymce.