Introduction: Arduino LED Dice (Easy)

This is an Instructable on DIY LED dice using Arduino.

*Ideas adapted from https://www.instructables.com/id/Arduino-Led-Dice/

I used the code and circuit from the Instructable above.

*Added visual and sound effects to the code, as well as a decorative cover for the LED dice*

這個Instructable的主題是自製 Arduino LED 骰子

製作方式/靈感來源:https://www.instructables.com/id/Arduino-Led-Dice

我運用了上方連結中的程式和電路

*並加上視覺、聽覺特效,並且裝飾裝置*

Supplies

  • 7 LED lights
  • 7 resistors (1/4W)
  • 1 precision resistor (1/4W)
  • 1 button
  • 1 speaker
  • 1 Arduino
  • 1 breadboard
  • 1 cardboard box
  • 1 scissor
  • about 50 lines

Step 1: Preparation

Prepare all the items you need from the "Supplies" section above.
請準備上方 "Supplies" 提到的物件

Step 2: Build the Circuit (LED)

Add the 7 LED and 7 resistors onto the breadboard like the example shown in the images.

在麵包板上插入七個LED和七個電阻(如上圖)

Step 3: Build the Circuit (Button)

Then, add the button as well as the precision resistor onto the breadboard (beside the LEDs).

Attach the charges for the LEDs (short leg= negative/ long leg= positive)

*Example is shown in the image*

在麵包板上加入按鈕和精密電組(插在LED旁邊)

幫LED電路加上正負極的線路(短腳=負極/ 長腳=正極)

*電路圖請參考照片*

Step 4: Build the Circuit (Speaker)

Attach the speaker onto your Arduino

(red line on digital pin/ black line on breadboard's negative charge)

*Example is shown in the image*

加上喇叭

(紅線接上digital pin/ 黑線接到負極)

*電路圖請參考圖片*

Step 5: Upload the Code

Step 6: Test Your Project

When you finish adding the code and building the circuit, you can test your project by uploading the code onto your Arduino. If it works, you can scroll down to the next step; but if it doesn't work, try to adjust your code or circuit (be sure to insert the write digital pin for both the LEDs and the button).

如果已經打好程式碼也接好電路,就可以上傳程式了。如果你成功了,可以繼續往下滑; 如果失敗了,可以看一下電路過程式碼是否有接錯。(程式碼的digital pin要記得輸入正確)

Step 7: Make Your Dice Different

Try moving your dice into a cardboard box and decorate it.

(If you wish to pull the LEDs out of the box, be sure to extend the lines (picture 2) so it can be seen)

你可嘗試把你的裝置移進紙盒裡,並且加上裝飾。

(如果想把燈泡拉到紙盒外,記得用鱷魚夾(如圖二))

Step 8: Final Product

If you finished all the steps above, you probably have a dice like the one in the pictures.

如果上述的步驟都做完了,恭喜你成功完成一個LED骰子。