Arduino 專案 - 以電視遙控器控臥室天花板電燈開關 (3) : Arduino Project - Switch Bedroom Light with TV remote Part 3
上次把電子零件通通焊到板子上了,今天來完成這個專案吧! 首先,要先找到提供電源給Arduino 的方法。看了網路上很多人都說自製變壓器要小心安全的問題,大都建議用現成的變壓器,所以我拿了手上一個手機變壓器來當做電路板的電源。 After I soldered all components on the perfboard, let's complete this project today! First, I need to find a way to provide power to our perfboard. Many people on the internet recommended to use a mobile phone charger instead of making one themselves due to safety concerns. So I got a spare HTC charger for my project as shown below. 把USB電線剪斷小端(MicroUSB) 到適合的長度,把外皮剝開,裡面會有四條不同顏色的電線如下圖,紅是正極,黑是負極。把正負極焊到電路板上。 Carefully cut the microUSB end and pelled the shielding off the cable. In there, you will be four wires with GREEN, WHITE, RED, BLACK. Solder the RED and BLACK to positive and negative on your perfboard. 再把正負極焊在電路板上後,記得插電到電路板上先試試功能是否正常。 After soldered the wires, plug charger and test your board to see if it's working. 這是我房間裡的燈,它由開關來開啟,每次開關一次,它會循環:3個燈/關,5個燈/關,2個燈/關,小夜燈/關。 My bedroom light looks like this below. It has a switch l