This experiment makes the use of ‘Android- Arduino BTCOMM Shield’ and Amarino. If you are not familiar with the shield, visit this page.
This experiment is similar to my previous tutorials on RGB multicolor lamp using Amarino. and RGB multicolor lamp with custom Bluetooth ID on Amarino Interface.
If you have never worked with Amarino, I strongly recommend you to visit Amarino page and understand the basics of Amarino.
RGB LED connection to Arduino Shield:
We have used common cathode RGB LED for the Multicolor lamp experiment. The connections:
Red: Digital Pin 3
Green: Digital Pin 6
Blue: Digital Pin 5
a. Download Amarino and install on your Android Phone.
b. Download Amarino Library for Arduino and move it to the Libraries folder.
d. Download Arduino code for Multicolor Lamp and upload in your Arduino.
(Note: The Arduino sketch for this experiment is slightly different from the original source code from Amarino. The extra codes on the sketch deactivates the CD4094 chip. It is necessary to deactivate CD4094, otherwise, the power is shared with the chip and it affects the RGB lamp experiment. For Amarino 3.0 shield, you can simply switch off the DIP switch)
If you are interested in CD4094 experiments, follow this link.
NOTE: The Arduino Sketch has its baud rate set at 9600 bits/s. Therefore, your Bluetooth module should also have the same baud rate. Generally, the default baud rate of BlueSMiRF and general bluetooth adaptors is 9600 bps. However, if you want to change baud rate of BlueSMiRF module, follow this link. I have tested this experiment with both 57600 bps and 9600 bps and it works perfectly well. I don’t know if we can change baud rate of general Bluetooth adaptors.
The shields version 1.0 and 2.0 have spaces for two different Bluetooth Adapters. Check if you have these adapters. Even if you don’t have these adapters, you can use any other by fixing on breadboard and connecting with extra cable.
f. Activate Bluetooth function of your phone and note down the MAC ID of your Bluetooth adaptor and write it on the text box of your RGB Lamp application.
g. Connect to the Bluetooth adapter from your phone and operate the RGB Lamp.
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic - Simulation - PCB Layout - Gerber Viewer
Cheapest PCB Prototype: Only $2 for 10pcs 10×10cm PCBs, 24 hours Quick Turn, DHL Delivery in 3 Days