0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Seeed Studio XIAO ESP32C3でフルカラーLEDテープを光らせる

Posted at

IMG_9618(大).jpeg

はじめに

Seeed Studio XIAO ESP32C3を使って、TapeLEDを光らせる方法の紹介です。
Arduino UNOからESP32への乗り換えです。

環境

Mac OSX 13.4.1
Arduino 2.2.1
Seeed Studio XIAO ESP32C3

手順

①Arduino IDEをインストールし、基本設定を開く。
②追加ボードマネージャのURLに
http://drazzy.com/package_drazzy.com_index.json
を追加する。(不要かも)
image.png
③ボードマネージャからesp32で検索して、下のやつ(3.2.0)をインストール
image.png
④ボード(board)とポート(port)を選択する
ESP32C3 Dev Module
XIAO_ESP32C3
DFRobot Beetle ESP32-C3
などを試して、いずれも動作した。
image.png

arduino
#include <Adafruit_NeoPixel.h>
#define PIN 10
#define NUMPIXELS 4

Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  pixels.begin();
}

float th = 0;
void loop() {
  pixels.clear();

  for (int i = 0; i < NUMPIXELS; i++) {
    pixels.setPixelColor(i, pixels.Color(0, 0, sin(th)*128+128));
    pixels.show();
  }
  th+=0.01;
  delay(1);
}

接続

GND同士を接続
LEDの5V端子は、XIAOのVUSB端子(5V)か3.3V。幸い3.3Vでも動作した。
信号線は10番ピン

困った(メモ)

ボードマネージャでseeeduinoと検索して、出てくるやつをインストールしてから、
ボード選択で、
SEEED SAMD>Seeeduino XIAO
を選ぶと、書き込みエラーで進めない。
こちらのほうが、コンパイルが速いきがするので、使いたいのだが無理。

本稿でのコンパイル時間は20秒。
書き込みは10秒。

メモ

XIAOは、たくさん種類があってわかりにくい。
XIAO SAMD21:これが基本
XIAO XIAO ESP32-C3:LiPoバッテリー充電可。リセットボタンあり。Lチカ用のLEDなし。

DFRobot Beetle ESP32-C3

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?