Mturk Jobs

Mturk Jobs
Mturk Jobs

Tank

Showing posts with label Mood Light RGB. Show all posts
Showing posts with label Mood Light RGB. Show all posts

Thursday, November 28, 2019

Arduino Bluetooth RGB Mood Light in 5 Minutes - Hint: Easy Circuit

This is a Smartphone Bluetooth controlled RGB Mood light lamp using Arduino and HC-06 Bluetooth Module.


This project is both easy and rewarding. Mood light is a nice project to make for your kids and family. It adds a touch of beauty to your home and warmth to your surroundings.

Some of Mood Light projects can be somehow hard to implement. But in this project, I managed to make it as simple as possible.
You should be able to complete this project in less than fifteen minutes.

The power behind this kind of simplicity comes from the wonderful application and website Remote XY.



You can use it to create any wireless and remote Arduino project from anywhere in the world. Whether you connect your phone to your project using Bluetooth, WIFI or even through the internet, you can always connect them both easily.

Also, the design process is much easier than many other platforms.

Components

Arduino UNO Board
HC-06 Bluetooh Module
Red, Green and Blue LEDs
I connected the negative (shorter) leg of the three LEDs together for easy use.

Jumper wires









Connection
You need to connect Arduino to the HC-06 Module only through four wires.
Arduino           HC-06
Vcc           Vcc
GND  GND
Tx          Rx
Rx          Tx


Application design
Go to RemoteXY.com and open the Editor. Choose connection, device and wireless module. Then you can place application visual controls and indications.
























Software Generation
You need to download the generated code from the editor. You also need to include the Remote XY library from the same page.

Then you need to edit the code in Arduino IDE.

That's because the generated code only configures the controls. Then you need to code the actions between Arduino and those controls.

The final code is attached here.
And you can download the RemoteXY Library from the website or from here.





Final Interface

Download Remote XY App from Google Play or Apple Store.

Open it and connect to your device.

You can see the interface loads on your smartphone.

This is how the interface looks on the Smartphone.

Note:

You don't need to be connected to the internet for using this interface between the phone and Bluetooth Module.



Operational Test

Run the application and power up the device.

Try the different modes of operation.

In the RGB mode, you can control the output color using the RGB circular control.

In the MOOD mode, the light fades in and fades out automatically.











Tuesday, May 1, 2018

Bluetooth Arduino RGB Mood Light

In this post, I'll show you how to make a beautiful Arduino RGB Mood Light that can be controlled via Bluetooth.



The circuit is very simple.

You only connect Arduino to the Bluetooth module.

Most popular are HC-05 and HC-06 modules.

They are inexpensive and easy to use.

You can use them to send and receive data to and from Arduino like any serial device.




They have reliable Bluetooth connection with phones and there are many Apps out there that can be used with Arduino projects.


Components



• 1x Arduino uno 
• 1x Bluetooth module (HC-05) or HC-06
• 4x RGB LEDs 
• 1x 9v Battery 
• 4x 100 ohm resistor 
• 1x 9v Battery clip 
• Female-Male jumper wires
• Rainbow cable 
• Perfboard


Connections

Connect the BT module to Arduino
Vcc ---- Arduino 3.3v or 5v (according to your module)
Gnd ---- Arduino gnd
Rx ---- Arduino Tx

Tx ---- Arduino Rx


Picture of Connect the Bluetooth Module to Arduino

LED Connection to Arduino






Code


Android Software

The post says that there is a link for the Android App that controls the Bluetooth module.

But unfortunately, I couldn't find any link to the App.

Thus I searched and found many applications on Google play and Amazon that can make the function of controlling the Bluetooth module and Arduino board.

You can download any of them and start your own Arduino Application.

Here are some of them

ArduDroid
Arduino Bluetooth Control
Ardroid


//pins for the LEDs:
const int redPin = 3;
const int greenPin = 5;
const int bluePin = 6;

const int redPin2 = 9;
const int greenPin2 = 10;
const int bluePin2 = 11;

#define REDPIN 3
#define GREENPIN 5
#define BLUEPIN 6

#define FADESPEED 5

void setup() {
// initialize serial:
Serial.begin(9600);

// make the pins outputs:
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);

pinMode(redPin2, OUTPUT);
pinMode(greenPin2, OUTPUT);
pinMode(bluePin2, OUTPUT);

Serial.print("Arduino control RGB LEDs Connected OK ( Sent From Arduinno Board )");
Serial.print('\n');
}

void loop() {

// if there's any serial available, read it:
while (Serial.available() > 0) {

 // look for the next valid integer in the incoming serial stream:
 int red = Serial.parseInt();
 // do it again:
 int green = Serial.parseInt();
 // do it again:
 int blue = Serial.parseInt();

 int red2 = Serial.parseInt();
 // do it again:
 int green2 = Serial.parseInt();
 // do it again:
 int blue2 = Serial.parseInt();

 // look for the newline. That's the end of your
 // sentence:
 if (Serial.read() == '\n') {
           
   // constrain the values to 0 - 255 and invert
   // if you're using a common-cathode LED, just use "constrain(color, 0, 255);"
   
   // This is for COMMON ANODE
   //red = 255 - constrain(red, 0, 255);
   //green = 255 - constrain(green, 0, 255);
   //blue = 255 - constrain(blue, 0, 255);
  
   red = constrain(red, 0, 255);
   green = constrain(green, 0, 255);
   blue = constrain(blue, 0, 255);
  
   red2 = constrain(red2, 0, 255);
   green2 = constrain(green2, 0, 255);
   blue2 = constrain(blue2, 0, 255);

   // fade the red, green, and blue legs of the LED:
   analogWrite(redPin, red);
   analogWrite(greenPin, green);
   analogWrite(bluePin, blue);
  
   analogWrite(redPin2, red2);
   analogWrite(greenPin2, green2);
   analogWrite(bluePin2, blue2);

   // print the three numbers in one string as hexadecimal:
    Serial.print("Data Response : ");
   Serial.print(red, HEX);
   Serial.print(green, HEX);
   Serial.println(blue, HEX);
 }
}

}




Source: Instructables








Check our books on Amazon:





Learn By Making: Embedded Systems Tutorial for Students and Beginners









Embedded Systems, Electronics: My Projects Collection From Instructables






Tank