Skip to content

Instantly share code, notes, and snippets.

@Nekodigi
Created November 21, 2020 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nekodigi/6315a386fa9bd3293e93b93932abf482 to your computer and use it in GitHub Desktop.
Save Nekodigi/6315a386fa9bd3293e93b93932abf482 to your computer and use it in GitHub Desktop.
#include <Adafruit_NeoPixel.h>
#define PIN 2
#define NUMPIXELS 300
#define DELAY 1
int frameCount = 0;
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin();
}
void loop() {
pixels.clear();
for(int i=0; i<NUMPIXELS; i++){
pixels.setPixelColor(i, pixels.ColorHSV(((i+frameCount)*500), 255, 5));//~65536?, ~256, ~256
}
pixels.show();
delay(DELAY);
frameCount++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment