1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

(Adafruit_NeoPixel)XIAO ESP32C6、RGB LEDで遊ぶ

Posted at

いろいろ、注意

  • 過去ログをみょ!!!
  • Adafruit NeoPixelをインストール

目的

M5Stack社製のGROVEシステム RGB LEDを光らせて遊ぶ

結果

image_original (86).jpg

プログラム




//rgb_led_XIAO_ESP32C6_2


//インクルド
#include <Arduino.h>
#include <Adafruit_NeoPixel.h>


//定義
#define NUM_LEDS 3
#define OUT_GPIO_NUM D10 //XIAO-ESP32C6
Adafruit_NeoPixel strip(NUM_LEDS, OUT_GPIO_NUM, NEO_GRB + NEO_KHZ800);


//初期化
void setup() {
  // put your setup code here, to run once:

  //ネオピクセルの設定
  strip.begin();
  strip.show();

  //カラーセット
  strip.setPixelColor(0, strip.Color( 5, 0, 0));
  strip.setPixelColor(1, strip.Color( 0, 5, 0));
  strip.setPixelColor(2, strip.Color( 0, 0, 5));
  
  strip.show();//再表示

}//setup


//メインループ
void loop() {
  // put your main code here, to run repeatedly:

  delay(3); //ダミー

}//loop



1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?