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.
For All Your PCB Need, One-stop PCB Solution Services Appear
EasyEDA: free PCB design tool, 200,000+ engineers are using
PCBs: 10pcs 2-layer 10x10cm only $8.21, on-time global shipping
Components: save up to 50% , combine shipment with PCBs