Difference between revisions of "Microduino Mobile Bluetooth Controls RGB Lights"
(→Document) |
(→Debugging) |
||
Line 48: | Line 48: | ||
*Step 1:Prepare all equipments [[File:Microduino_BT_RGB_all.jpg||600px|center|thumb]] | *Step 1:Prepare all equipments [[File:Microduino_BT_RGB_all.jpg||600px|center|thumb]] | ||
− | *Step 2:Make sure your BT serial method. | + | *Step 2:Make sure your BT serial method is right. |
Using soft serial port (9,10) for program test. | Using soft serial port (9,10) for program test. | ||
**If you adopt serial port (2,3) | **If you adopt serial port (2,3) | ||
− | ***And you use Core, please change “SoftwareSerial mySerial(9, 10);”to“SoftwareSerial mySerial(2, 3); ” | + | ***And if you use Core, please change “SoftwareSerial mySerial(9, 10);”to“SoftwareSerial mySerial(2, 3); ” |
− | ***Or if you use Core+, you need to change “mySerial” of loop to “Serial1”. | + | ***Or if you use Core+, you need to change “mySerial” of the "loop" to “Serial1”. |
**If you adopt serial port (0,1) | **If you adopt serial port (0,1) | ||
− | ***You need to change “mySerial” of loop to “Serial1”.and can’t fold BT in the download, or the serial ports will conflict. | + | ***You need to change “mySerial” of the "loop" to “Serial1”.and can’t fold BT in the download, or the serial ports will conflict. |
*Step 3:Build a Circuit | *Step 3:Build a Circuit | ||
**Overlay modules available | **Overlay modules available | ||
− | **Make sure common anode | + | **Make sure RGB pins are of common anode |
− | ***The longest pin is positive or the widest one when you look at the RGB light in the head. Here no electric resistance is adopted and the pin will be connected to 3.3V. | + | ***The longest pin is positive or the widest one when you look at the RGB light in the head. Here, no electric resistance is adopted and the pin will be connected to 3.3V of electricity. |
***Players can directly measure the corresponding color of the other three pins through a multimeter or a module. And then connect the pins correspondingly. | ***Players can directly measure the corresponding color of the other three pins through a multimeter or a module. And then connect the pins correspondingly. | ||
[[File:Microduino_BT_RGB_ok.jpg||600px|center|thumb]] | [[File:Microduino_BT_RGB_ok.jpg||600px|center|thumb]] | ||
− | *Step 4:Download test program and open it. | + | *Step 4:Download test program and then open it. |
− | **First, make sure your BT serial port, which can refer to step 2. | + | **First, make sure your BT serial port is right, which can refer to step 2. |
**Make sure the RGB lights are of common anode. If not, you need to: | **Make sure the RGB lights are of common anode. If not, you need to: | ||
***Change the solution:The longest pin refers to negative and meanwhile, you need to connect it to GND. | ***Change the solution:The longest pin refers to negative and meanwhile, you need to connect it to GND. |
Revision as of 08:29, 30 April 2014
Outline
PrincipleMobile clients can simulate the color of the lights via three progress indicators which send the quantitative values obtained from simulation experiment to Microduino Core via BT. Thus, we can easily control the color of RGB lights by calculating since we get both the simulated values and analogWrite(). In order to have a better control experience, we need to connect pins of RGB lights to those of PMW(3、5、6、11) . Since both Microduino BT and Microduino Core adopt soft serial port for communication, we can't connect RGB lights to pins (9,10). Otherwise, data chaos may appear. Bill of Materials
DocumentAndroid Client-side: File:Microduino RGB.zip Notice:Make sure your BT is the 2.1 version since Android client-side is only suitable for 2.1 BT temporarily Program Test: https://github.com/Microduino/Microduino_Tutorials/commit/46ebefd3f9739ccbede60e72d4463f998a33590f Debugging
Using soft serial port (9,10) for program test.
ResultIn virtue of Microduino, you can successfully control RGB lights through cellphone Notice
Video |