This week, my idea is to make a Bluetooth-controlled lantern using Arduino, an RGB LED, and a buzzer. When I send a command from my phone the lantern lights up in a short sequence with sound, and another command turns everything off.
For this assignment, I designed a small smart circuit in Tinkercad with Arduino UNO, a Bluetooth module, an RGB LED, and a buzzer. I chose the RGB LED because it shows different colors, and the buzzer for sound feedback. The circuit connects to my phone wirelessly through Bluetooth, and I used a simple Bluetooth terminal app as the GUI to send commands.
After preparing the wiring diagram, I built the circuit on a breadboard and tested it. Sending “A” makes the buzzer beep and the RGB LED light up in sequence, while “B” turns everything off. I programmed it using the Arduino IDE and documented the process with the diagram, photos, and a screenshot of the code.
I built the circuit on a breadboard using an Arduino UNO, RGB LED, buzzer, and a Bluetooth module. After wiring the components according to my Tinkercad design, I tested the circuit step by step to make sure each part worked. The Arduino was programmed in Arduino IDE C language and the uploaded code made the buzzer beep and RGB LED light up when I sent “A” from my phone, and turned everything off when I sent “B” like it shows in the video
First, the code checks if there is any incoming data from the Serial,
Then there are two main conditions:
If the phone sends the letter A:
The buzzer turns on briefly, then off.
The red LED turns on briefly, then off.
The blue LED turns on briefly, then off.
Finally, the green LED stays on.
Condition 2: if data == 'B
If the phone sends the letter B:
All components (red, green, blue LEDs and the buzzer) turn off.
char data = '\0';
#define RED 13
#define GREEN 12
#define BLUE 11
#define BUZZER 10
void setup() {
Serial.begin(9600);
pinMode(RED, OUTPUT);
pinMode(GREEN, OUTPUT);
pinMode(BLUE, OUTPUT);
pinMode(BUZZER, OUTPUT);
digitalWrite(RED, LOW);
digitalWrite(GREEN, LOW);
digitalWrite(BLUE, LOW);
digitalWrite(BUZZER, LOW);
}
void loop() {
if (Serial.available()) {
data = Serial.read();
if (data == 'A') {
digitalWrite(BUZZER, HIGH); delay(200);
digitalWrite(BUZZER, LOW);
digitalWrite(RED, HIGH); delay(200);
digitalWrite(RED, LOW);
digitalWrite(BLUE, HIGH); delay(200);
digitalWrite(BLUE, LOW);
digitalWrite(GREEN, HIGH);
}
else if (data == 'B') {
digitalWrite(RED, LOW);
digitalWrite(GREEN, LOW);
digitalWrite(BLUE, LOW);
digitalWrite(BUZZER, LOW);
}
}
}
video of the wiring
*prompt* this is my inspirational *code* edit it and generate a new code i have an Arduino project currently controlling an RGB LED using a Bluetooth module. I want to simplify it to use the Serial Monitor instead, keeping the same structure and style. Use #define for pins: Red = 13, Blue = 11, Green = 12, Buzzer = 10. Use setup() to initialize everything, and loop() with simple if statements. Use one-letter commands: 'A' should run the LED + buzzer sequence (buzzer, red, blue, then green stays on), and 'B' should turn everything off. Keep the code readable, maintain delays and the LED order.
Removed NeoPixel dependency:
Instead of controlling a strip of LEDs, I used single LEDs connected to Arduino digital pins.
Replaced parsing three integers (red, green, blue) with single-character commands.
Removed colorSet() function.
Added buzzer and LED sequence.
Preserved the original order: buzzer → red → blue → green stays ON.
All commands now come directly from Serial Monitor.
At first the circuit didn’t work smoothly. One of the jumper wires was loose, so the LED and buzzer didn’t always respond. I also kept pressing “A” from the app but nothing happened—until I realized I hadn’t paired the Bluetooth yet. Another thing I learned is that I had to unplug the Bluetooth wires from pins 0 and 1 before uploading new code, then reconnect them after. Once I fixed these small issues, everything worked fine.
Title of Media