Difference between revisions of "Open Source Smart Bluetooth Lights Illuminator"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{| style="width: 800px;" |- | ==Overview== *Project:Microduino mobile phone Bluetooth lights toning *Objective: Combine Microduino-BT and Microduino-Core by mobile phone f...")
 
 
Line 3: Line 3:
 
|
 
|
 
==Overview==
 
==Overview==
*Project:Microduino mobile phone Bluetooth lights toning
+
*Project: Microduino mobile phone Bluetooth lights toning
*Objective: Combine Microduino-BT and Microduino-Core by mobile phone for Bluetooth communication, to control the color of Microduino-LAMP.
+
*Objective: Combine Microduino-BT and Microduino-Core by mobile phone for Bluetooth communication, to control the color of Microduino-LAMP.
*Difficulty:High grade
+
*Difficulty: High
*Time-consuming:
+
*Time-consuming:
*Maker:Microduino Studio-YLB
+
*Maker: Microduino Studio-YLB
  
 
Equipment can connect with mobile phone via Bluetooth, combining with the APP to control the color of the light. It has single color control, six color control, and brightness control. Users can customize the shell according to their preference.
 
Equipment can connect with mobile phone via Bluetooth, combining with the APP to control the color of the light. It has single color control, six color control, and brightness control. Users can customize the shell according to their preference.
Line 34: Line 34:
 
==Documents==
 
==Documents==
  
Android client:
+
Android client:
  
Note:The new version of BT is Bluetooth 4.0, needing more than Android 4.3 system to support. Here only provides Android APP.
+
Note: The new version of BT is Bluetooth 4.0, needing more than Android 4.3 system to support. Here only provides Android APP.
  
APP download:'''[[File:Microduino-LAMP-APP.zip]]'''
+
APP download: '''[[File:Microduino-LAMP-APP.zip]]'''
 
   
 
   
Test program:[https://github.com/Microduino/Microduino_Tutorials/blob/master/MCookie_Tutorial/ble_color_led/ble_color_led.ino ble_color_led]
+
Test program: [https://github.com/Microduino/Microduino_Tutorials/blob/master/MCookie_Tutorial/ble_color_led/ble_color_led.ino ble_color_led]
  
IOS source code download:[https://github.com/zidong0822/MLight2 IOS_MLight]
+
IOS source code download: [https://github.com/zidong0822/MLight2 IOS_MLight]
  
 
==Debugging==
 
==Debugging==
*Step1:Prepare all the equipment.
+
*Step1: Prepare all the equipment.
 
[[File:Microduino_BT_LAMP_all.jpg||300px|center|thumb]]
 
[[File:Microduino_BT_LAMP_all.jpg||300px|center|thumb]]
  
*Step2:Make sure your BT serial connection, and the default is D4, D5.
+
*Step2: Make sure your BT serial connection, and the default is D4, D5.
 
The test program uses soft serial D4,D5.
 
The test program uses soft serial D4,D5.
 
**If you are using D2 and D3
 
**If you are using D2 and D3
***When the core board is the Core, please change “SoftwareSerial mySerial(4, 5);”into“SoftwareSerial mySerial(2, 3);
+
***When the core board is the Core, please change "SoftwareSerial mySerial(4, 5);"into"SoftwareSerial mySerial(2, 3);"
***When the core board is Core+, you need to change “mySerial” in loop into “Serial1”.
+
***When the core board is Core+, you need to change "mySerial" in loop into "Serial1".
 
**If you are using D0, D1
 
**If you are using D0, D1
***You need to change “mySerial” into “Serial” in loop, and you can’t overlay BT when you download programs,  or the serial ports will conflict.
+
***You need to change "mySerial" into "Serial" in loop, and you can't overlay BT when you download programs,  or the serial ports will conflict.
 
[[file:Microduino-BT-2Big1.jpg|600px|thumb|center|Microduino-BT]]
 
[[file:Microduino-BT-2Big1.jpg|600px|thumb|center|Microduino-BT]]
*Step3:Build circuit.
+
*Step3: Build circuit.
 
Overlay the modules that will be used.
 
Overlay the modules that will be used.
 
[[File:Microduino_BT_module.jpg||300px|center|thumb]]
 
[[File:Microduino_BT_module.jpg||300px|center|thumb]]
*Step4:Download the test program and open it.
+
*Step4: Download the test program and open it.
 
**Confirm your BT serial port, and download directly after confirming the compiler, referring to Step2.  
 
**Confirm your BT serial port, and download directly after confirming the compiler, referring to Step2.  
  
*Step5:Download Android client. Unzip , install and open. If you haven’t opened Bluetooth, it will prompt you to open a Bluetooth device.
+
*Step5: Download Android client. Unzip , install and open. If you haven't opened Bluetooth, it will prompt you to open a Bluetooth device.
 
[[File:Microduino_BT_Serial_1.png||300px|center|thumb]]
 
[[File:Microduino_BT_Serial_1.png||300px|center|thumb]]
*Step6:Click SCAN on the upper right corner to search device, which is called Microduino, and click it to connect.
+
*Step6: Click SCAN on the upper right corner to search device, which is called Microduino, and click it to connect.
 
[[File:Microduino_BT_Serial_2.png||300px|center|thumb]]
 
[[File:Microduino_BT_Serial_2.png||300px|center|thumb]]
*Step7:The initial situation is Serial Present appearing in the upper right-hand corner, and waiting for about 1s it will change into Serial ready, and at this time you can communicate normally.
+
*Step7: The initial situation is Serial Present appearing in the upper right-hand corner, and waiting for about 1s it will change into Serial ready, and at this time you can communicate normally.
 
[[File:Microduino_BT_Serial_3.png||300px|center|thumb]]
 
[[File:Microduino_BT_Serial_3.png||300px|center|thumb]]
*APP Introduction:
+
*APP Introduction:
**You can choose whether the color is single or not through the upper:Single Color,  the color of the six lamps in LAMP is same or not:Multi Color,the color of each lamps in LAMP is all different.
+
**You can choose whether the color is single or not through the upper: Single Color,  the color of the six lamps in LAMP is same or not: Multi Color,the color of each lamps in LAMP is all different.
 
**You can adjust the brightness of the lamps through the ring.
 
**You can adjust the brightness of the lamps through the ring.
 
**You can switch on or off the lamps through the switch underneath.
 
**You can switch on or off the lamps through the switch underneath.

Latest revision as of 07:37, 13 September 2016

Overview

  • Project: Microduino mobile phone Bluetooth lights toning
  • Objective: Combine Microduino-BT and Microduino-Core by mobile phone for Bluetooth communication, to control the color of Microduino-LAMP.
  • Difficulty: High
  • Time-consuming:
  • Maker: Microduino Studio-YLB

Equipment can connect with mobile phone via Bluetooth, combining with the APP to control the color of the light. It has single color control, six color control, and brightness control. Users can customize the shell according to their preference.

Bill of Material

  • Microduino equipment
Module Number Function
Microduino-Core 1 Core board
Microduino-USBTTL 1 Program download
Microduino-BT 1 Bluetooth communication
Microduino-LAMP 1 Illumination
  • Other equipment
USB cable 1 Power supply, and program download

Documents

Android client:

Note: The new version of BT is Bluetooth 4.0, needing more than Android 4.3 system to support. Here only provides Android APP.

APP download: File:Microduino-LAMP-APP.zip

Test program: ble_color_led

IOS source code download: IOS_MLight

Debugging

  • Step1: Prepare all the equipment.
Microduino BT LAMP all.jpg
  • Step2: Make sure your BT serial connection, and the default is D4, D5.

The test program uses soft serial D4,D5.

    • If you are using D2 and D3
      • When the core board is the Core, please change "SoftwareSerial mySerial(4, 5);"into"SoftwareSerial mySerial(2, 3);"
      • When the core board is Core+, you need to change "mySerial" in loop into "Serial1".
    • If you are using D0, D1
      • You need to change "mySerial" into "Serial" in loop, and you can't overlay BT when you download programs, or the serial ports will conflict.
Microduino-BT
  • Step3: Build circuit.

Overlay the modules that will be used.

Microduino BT module.jpg
  • Step4: Download the test program and open it.
    • Confirm your BT serial port, and download directly after confirming the compiler, referring to Step2.
  • Step5: Download Android client. Unzip , install and open. If you haven't opened Bluetooth, it will prompt you to open a Bluetooth device.
Microduino BT Serial 1.png
  • Step6: Click SCAN on the upper right corner to search device, which is called Microduino, and click it to connect.
Microduino BT Serial 2.png
  • Step7: The initial situation is Serial Present appearing in the upper right-hand corner, and waiting for about 1s it will change into Serial ready, and at this time you can communicate normally.
Microduino BT Serial 3.png
  • APP Introduction:
    • You can choose whether the color is single or not through the upper: Single Color, the color of the six lamps in LAMP is same or not: Multi Color,the color of each lamps in LAMP is all different.
    • You can adjust the brightness of the lamps through the ring.
    • You can switch on or off the lamps through the switch underneath.
Microduino BT Serial 5.png

Result

Mobile phones can be successfully implemented by Microduino to control lights, to get any color you want.

Microduino BT res.jpg

Attention Problems

  • Confirm the BT serial port.
  • Only systems more than Android 4.3 can support.

video