3
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?

More than 5 years have passed since last update.

Arduino Nano互換ボードでLEDライトを光らせてみた。

Last updated at Posted at 2018-01-06

秋葉原のLED専門店でLEDライトとArduino Nano互換機を買いました。
LEDテープは100Vのものを買うと電源から取らないといけない。
モバイルバッテリーから動かしたかったので5Vのものを購入。
ICがついてるタイプである必要もある。
NeoPixel RGBを買いました。
Jumper wiresはオスオスのん。

IMG_0515.jpg

必要なもの一覧

– Arduino Nano
– Jumper wires
– Breadboard
– WS2812B-based LED strip

IDEをインストール

Arduino Software (IDE) on OS X
https://www.arduino.cc/en/Guide/MacOSX

繋げる

スクリーンショット 2018-01-06 22.33.06.png

IMG_0516.jpg

コード

この通りやれば良い

# include "FastLED.h"
# define DATA_PIN 3
# define LED_TYPE WS2812B
# define COLOR_ORDER GRB
# define NUM_LEDS 30
# define BRIGHTNESS 96
CRGB leds[NUM_LEDS];
void setup() {
  delay(3000); // initial delay of a few seconds is recommended
  FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip); // initializes LED strip
  FastLED.setBrightness(BRIGHTNESS);// global brightness
}
...
略

ライブラリをインストール

スクリーンショット 2018-01-06 22.19.32.png スクリーンショット 2018-01-06 22.19.47.png

コンパイル

スクリーンショット 2018-01-06 22.19.08.png

マイコンボードに書き込む

スクリーンショット 2018-01-06 22.23.29.png

光るはず。

ブチって電源抜いて終了

3
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
3
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?