艺术
美容与健康
工艺
文化与历史
娱乐
环境
食品与饮料
逆向工程
科学
体育
技术
可穿戴设备

Driving Multiple LEDs — SIK Circuit 4
Make eight LEDs dance! Learn about arrays, for loops, and multiple output patterns including chase, ping-pong, marquee, and random blink effects.
说明
1
1
Parts & Introduction
Parts & Introduction
This experiment uses 8 LEDs to create light patterns. You'll learn about arrays (grouping related variables) and for loops (repeating actions efficiently). The sketch includes 6 different animation functions you can try.
Parts Needed
- 1x Arduino Uno + USB cable
- 1x Breadboard
- 8x LEDs (any color)
- 8x 330Ω Resistors
- 9x Jumper Wires
此步骤所需材料:
SparkFun Inventors Kit - V3.21 套件Arduino Uno R31 个
Breadboard1 个
5mm LED8 个
330 Ohm Resistor8 个
Jumper Wires9 个所需工具:
Computer with Arduino IDE
2
2
Hardware Hookup
Hardware Hookup
Wiring Instructions
- Place 8 LEDs in a row on the breadboard.
- For each LED, connect the negative leg (shorter) through a 330Ω resistor to GND.
- Connect the positive leg (longer) of each LED to Arduino digital pins 2 through 9 (LED 1 = pin 2, LED 2 = pin 3, etc.).
- Connect the GND rail on the breadboard to Arduino GND.
Tip: Keep the LEDs neatly spaced for the best visual effect.
此步骤所需材料:
5mm LED8 个
330 Ohm Resistor8 个Breadboard1 个
Jumper Wires9 个3
3
Arduino Code
Arduino Code
Open the Arduino IDE and upload the following sketch to your Arduino board.
multiple_leds.inoarduino
此步骤所需材料:
Arduino Uno R31 个
所需工具:
Computer with Arduino IDE
4
4
Test & Experiment
Test & Experiment
What You Should See
All 8 LEDs light up one after another, then turn off in reverse order. This repeats continuously.
Troubleshooting
- Some LEDs don't light: Easy to insert an LED backwards. Check polarity.
- Out of sequence: With 8 wires, it's easy to cross a couple. Verify LED 1 is on pin 2, then each pin in order.
- Starting fresh: Sometimes pulling everything out and re-wiring is faster than debugging.
Experiments to Try
- Uncomment the other functions in
loop()to try:oneOnAtATime(),pingPong(),marquee(),randomLED(). - Create your own animation pattern!
- Modify the delay times to change the speed.
材料
6- $105.00
估计总额
$174.00CC0 公共领域
此蓝图以 CC0 协议发布。你可以自由复制、修改、分发和使用此作品,无需征得许可。
通过购买蓝图中的产品支持创客,他们将获得 创客佣金 (由供应商设定),或创建此蓝图的新版本并将其作为连接包含在你自己的蓝图中以分享收入。