Outline
- Project: Microduino-LAMP color control & Bluetooth communication
- Obejective: Have Bluetooth communication between Microduino-BT and Microduino-Core via a mobile phone and control the color of Microduino-LAMP.
- Difficulty: High
- Time-consuming:
- Maker: Microduino Studio-YLB
Bill of Material
USB cable |
1 |
For power supply and program download
|
Document
Android Client:
Caution: BT 4.0 is the new version and it is supported by Android 4.3 or higher. Here we offer Android APP.
APP download: File:Microduino-LAMP-APP.zip
Program test:
ble_color_led
Debugging
- Step 1: Get all equipment prepared.
- Step 2: Make sure your BT serial port connection is right. (The default serial port is D4, D5. )
Here we adopt D4, D5 as the soft serial port to test program.
- When you use D2, D3,
- If adopting Core, you need to change “SoftwareSerial mySerial(4, 5);” to “SoftwareSerial mySerial(2, 3);”
- If adopting Core+, then you need to change “mySerial” in loop to “Serial1”.
- When you use D0, D1,
- you need to change “mySerial” to “Serial” and please don’t stack BT while downloading program or it will cause serial conflict.
- Step 3: Build the circuit
Stack all the modules needed.
- Step 4: Download test program and open it.
- Make sure you BT serial port is right, which can refer to step 2. After that, please compile program and download.
- Step 5: Download Android clinet, decompress, install and open it. Then you will see note to open Bluetooth device.
- Step 6: Click SCAN on top right, select Microduino and connect.
- Step 7: You can see “Serial Present” on top right when initializing and you can have communication when it turns to “Serial Ready’ 1s later.
- APP Instruction:
- Select color as the picture above: Single or Multi Color.
- Adjust brightness according to the circular ring.
- Turn on or off through the switch.
Result
You can use Microduino to to control colored lamp via a mobile phone and get any color you want.
Note
- Make sure the BT serial port is right
- It needs to be supported by Android 4.3 or higher.
Video
|