Skip to content

Instantly share code, notes, and snippets.

@BonyChops
Last active October 14, 2022 08:14
Show Gist options
  • Save BonyChops/76c42b6b70a8319d9158dbff0760c826 to your computer and use it in GitHub Desktop.
Save BonyChops/76c42b6b70a8319d9158dbff0760c826 to your computer and use it in GitHub Desktop.
LEDテープライト 全点灯サンプル
#include <Adafruit_NeoPixel.h>
#include <Arduino.h>
#define PIN 26 // LEDの信号線をつなぐマイコンのピン番号
#define STRIP_COUNT 52 //つなぐLEDの数
Adafruit_NeoPixel strip = Adafruit_NeoPixel(STRIP_COUNT, PIN, NEO_GRB + NEO_KHZ800); //あれこれ初期設定
void setup() {
strip.begin();
Serial.begin(9600);
for(int i = 0; i < STRIP_COUNT; i++){
strip.setPixelColor(i, strip.Color(255, 255, 255));
}
strip.show();
}
void loop() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment