#include <Adafruit_NeoPixel.h> #define LED_PIN 6 #define NUM_LEDS 16 Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800); void setup() { strip.begin(); strip.show(); // Initialize all pixels to off } void loop() { //pulse from high to low intensity for (int brightness=255; brightness >= 5; brightness--) { //set color to red for (int i = 0; i < NUM_LEDS; i++) { strip.setPixelColor (i, strip.Color(brightness, 0, 0)); } strip.show(); delay(10); } }
stuff
![](/assets/playground/adafruit_playground_1200x900-699010177a4a3fd6bac6bc31deae0bfa3eb9ea777ba62aaa5cbc1225bb45bfcc.jpg)
Adafruit Playground is a wonderful place to share what you find interesting. Have a cool project you are working on? Have a bit of code that you think others will find useful? Want to show off your electronics workbench? You have come to the right place.
Adafruit Playground is a safe place to share with the wonderful Adafruit community of makers and doers.
Click here to learn more about Adafruit Playground and how to get started.
This page (stuff) was last updated on March 24, 2024.
Text editor powered by tinymce.