In this project I’ll show you how to build a simple and complex Arduino Bluetooth mood light projects you can control with your smartphone.
This is made simple with this smart application Remote XY.
It’s a website and phone app that can help you create wireless Arduino projects easily.
You can make your mood light, RC car, Quadcopter, Home Automation or any other projectusing this basic information to connect Arduino to your smartphone via Bluetooth connection.
All the projects can be made simple thanks to this genius application.
Hardware required:
Arduino UNO Board
Amazon US, Amazon UK , Amazon DE, Amazon FR , Amazon ES, Amazon IT ,
HC-06 Bluetooh Module
Amazon US, Amazon UK , Amazon DE, Amazon FR , Amazon ES, Amazon IT ,
eBay, Banggood , Aliexpress
Red, Green and Blue LEDs
I connected the negative (shorter) leg of the three LEDs together for easy use.
Jumper wires
Connection Ciruit
The connection is very simple.
You connect the Arduino Board to the Bluetooth Module via the hardware serial port(Pin #0 and Pin #1).
Vcc Vcc
GND GND
Tx Rx
Rx Tx
Connect LEDs as follows
Arduino UNO <——> LEDs
GND Common Short Legs
Pin # 9 Red LED +ve terminal (Longer Leg)
Pin # 10 Green LED +ve terminal (Longer Leg)
Pin # 11 Blue LED +ve terminal (Longer Leg)
Configuration
Editor
Open Remote XY Editor at RemoteXY.com and place controls. RGB control and Toggle switch. Here is where you can design the Smartphone interface.
Connection
Bluetooth
Device
Arduino UNO
Module
HC-06 Module
IDE
Arduino IDE
Module Interface
Select Hardware Serial
Speed(Baud Rate) 9600
View
You can configure controls appearance here.
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.
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.
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.
In this project, I made a quick light diffuser using a piece of white paper.
Thank you for reading.
Check out my books on Amazon:
Code for Arduino mood light
/*
— BluetoothRGB —
This source code of graphical user interface
has been generated automatically by RemoteXY editor.
To compile this code using RemoteXY library 2.3.3 or later version
download by link http://remotexy.com/en/library/
To connect using RemoteXY mobile app by link http://remotexy.com/en/download/
– for ANDROID 4.1.1 or later version;
– for iOS 1.2.1 or later version;
This source code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
*/
//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
// RemoteXY select connection mode and include library
define REMOTEXY_MODE__HARDSERIAL
include
// RemoteXY connection settings
define REMOTEXY_SERIAL Serial
define REMOTEXY_SERIAL_SPEED 9600
// RemoteXY configurate
pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,4,0,0,0,30,0,8,13,0,
6,0,43,10,42,42,2,26,2,1,
12,23,22,11,2,26,31,31,77,111,
111,100,0,82,71,66,0 };
// this structure defines all the variables of your control interface
struct {
// input variable
uint8_t rgb_1_r; // =0..255 Red color value
uint8_t rgb_1_g; // =0..255 Green color value
uint8_t rgb_1_b; // =0..255 Blue color value
uint8_t switch_1; // =1 if switch ON and =0 if OFF
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
void setup()
{
RemoteXY_Init ();
// TODO you setup code
}
void loop()
{
RemoteXY_Handler ();
// TODO you loop code
// use the RemoteXY structure for data transfer
analogWrite( 9 , RemoteXY.rgb_1_r );
analogWrite( 10 , RemoteXY.rgb_1_g );
analogWrite( 11 , RemoteXY.rgb_1_b );
// This is for the Fading part. Provided that the switch is on the MOOD position
if(RemoteXY.switch_1==1)
{
analogWrite( 9 , brightness);
analogWrite(10 , brightness);
analogWrite(11 , brightness);
// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;
// reverse the direction of the fading at the ends of the fade:
if (brightness <= 0 || brightness >= 255) {
delay(400);
fadeAmount = -fadeAmount;
}
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
}
latest projects
- My Six Years Old Son Wanted to Build His own Flying CarBuilding My Son’s Dream: A Flying Car with Tinkercad and Arduino Ever since my 6-year-old son could talk, he’s been fascinated by the idea of flying cars. He would sketch designs, build models with his toys, and talk about how one day he would soar above the ground in a car with wings. His dream… Read more: My Six Years Old Son Wanted to Build His own Flying Car
- How I made My Kids #Arduino #Flying Car #Tinkercad Dream #Aviation #AeroArduinoIntroduction: Welcome to a new project from AeroArduino, where we turn dreams into reality! In this exciting project, we’re bringing to life a childhood dream of creating an Arduino flying car using TinkerCAD. If you haven’t subscribed yet, be sure to hit that subscribe button to stay updated with our latest projects. Circuit Connection: Let’s… Read more: How I made My Kids #Arduino #Flying Car #Tinkercad Dream #Aviation #AeroArduino
- Easy #Tinkercad #Arduino distance measurement using ultrasonic sensor #AeroArduino
- Building a Smart Ultrasonic Car With Code Blocks on TinkercadToday, I want to share an exciting project that brings together ultrasonic sensors, motors, and a sprinkle of programming magic to create a Smart Ultrasonic Car. Imagine a little robotic vehicle that can sense its surroundings and make decisions on the fly – that’s exactly what we’re diving into! The Heart of the Project: Ultrasonic… Read more: Building a Smart Ultrasonic Car With Code Blocks on Tinkercad
- Super Simulation for Accelerometer with Arduino in TinkercadIntroduction The world of electronics education often relies on simulation software to bridge theoretical knowledge and practical application. TinkerCAD stands as a prominent platform for simulating electronic components, aiding enthusiasts and learners in experimenting virtually. In this tutorial, we’ll explore how to overcome the absence of an accelerometer component in TinkerCAD by using a creative… Read more: Super Simulation for Accelerometer with Arduino in Tinkercad
- Monitoring Soil Moisture with Arduino and LCD: A Step-by-Step GuideHow to Build Step-by-Step Arduino Soil Moisture Sensor With Tinkercad Simulation – DIY Guide on AeroArduino
- Revolutionizing Aircraft Ground Handling: The Advantages of Remotely Controlled TugsIntroduction: The aviation industry has witnessed minimal innovation in aircraft tugs, resulting in outdated and inefficient ground handling operations. However, the advent of remotely controlled aircraft tugs has the potential to transform ground handling practices. These advanced tugs offer numerous advantages over traditional counterparts, including increased efficiency, improved safety, and reduced environmental impact. In this… Read more: Revolutionizing Aircraft Ground Handling: The Advantages of Remotely Controlled Tugs
- The Mighty Antonov AN-22: Revolutionizing Cargo Transportation in the SkiesIntroduction: In the realm of aviation, where technological advancements continually push boundaries, the Antonov AN-22 shines as a true marvel. With its massive size and unparalleled cargo-carrying capabilities, this iconic propeller aircraft has carved its name in the annals of aviation history. Join us as we delve into the world of the Antonov AN-22 and… Read more: The Mighty Antonov AN-22: Revolutionizing Cargo Transportation in the Skies