Johanneszockt1

Untitled

Apr 20th, 2021
501
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // NeoPixel Ring simple sketch (c) 2013 Shae Erisson
  2. // Released under the GPLv3 license to match the rest of the
  3. // Adafruit NeoPixel library
  4.  
  5. #include <Adafruit_NeoPixel.h>
  6.  
  7. #define PIN        6 // On Trinket or Gemma, suggest changing this to 1
  8. #define NUMPIXELS 16 // Popular NeoPixel ring size
  9. #define BRIGHNESS 100 //brighness on a scale of 0-255
  10. Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
  11.  
  12.  
  13. void setup() {
  14.   pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
  15.   pixels.setBrightness(100);
  16. }
  17.  
  18. void loop() {
  19.   //for (int i = 0; i < NUMPIXELS; i++) { // For each pixel...
  20.   pixels.setPixelColor(0, pixels.Color(255, 0, 0));
  21.   pixels.show();   // Send the updated pixel colors to the hardware.
  22.   delay(1000); // Pause before next pass through loop
  23.   pixels.setPixelColor(1, pixels.Color(0, 255, 0));
  24.   pixels.show();   // Send the updated pixel colors to the hardware.
  25.   delay(1000); // Pause before next pass through loop
  26.   pixels.setPixelColor(2, pixels.Color(0, 0, 255));
  27.   pixels.show();   // Send the updated pixel colors to the hardware.
  28.   delay(1000); // Pause before next pass through loop
  29.   pixels.clear();
  30.   delay(1000);
  31.   //}
  32.   //pixels.clear(); // Set all pixel colors to 'off'
  33. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×