Microduino Microduino-LAMP color control & Bluetooth communication

来自Microduino Wikipedia
跳转至: 导航搜索

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

  • Microduino equipment
Module Number Function
Microduino-Core 1 Core board
Microduino-USBTTL 1 Program download
Microduino-BT 1 Bluetooth communication
Microduino-LAMP 1 Colored lamp
  • Other equipment
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: 文件:Microduino-LAMP-APP.zip

Program test: ble_color_led

Debugging

  • Step 1: Get all equipment prepared.
Microduino BT LAMP all.jpg
  • 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.
Microduino-BT
  • Step 3: Build the circuit

Stack all the modules needed.

Microduino BT module.jpg
  • 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.
Microduino BT Serial 1.png
  • Step 6: Click SCAN on top right, select Microduino and connect.
Microduino BT Serial 2.png
  • 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.
Microduino BT Serial 3.png
  • 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.
Microduino BT Serial 5.png

Result

You can use Microduino to to control colored lamp via a mobile phone and get any color you want.

Microduino BT res.jpg

Note

  • Make sure the BT serial port is right
  • It needs to be supported by Android 4.3 or higher.

=Video