I decided to make something cool this week. When I go on trips, we usually use a whistle to tell the teams that time is over. However, each time we need to use a new whistle since we avoid reusing the old ones.
So, I came up with a better idea: a system that can be controlled via a mobile phone. When there is still time left, the green LED turns on. When the time is over, the red LED lights up and the buzzer beeps, replacing the need for the coach’s whistle.
Fritzing → A simulation app that I used this week instead of Tinkercad, since Tinkercad doesn’t include some components, such as the Bluetooth module.
Arduino → The big boss, acting as the brain for control.
Breadboard → The playground for connecting and testing components 😎.
Jumper wires → Used to connect components together.
Resistor → Prevents the LED from burning out.
Buzzer → Produces sound (action component).
RGB LED → An LED that can display different colors (action component).
I started working on Fritzing to connect the components. The connections were as follows:
RGB LED:
R → Resistor → Digital pin 5
G → Resistor → Digital pin 6
B → Resistor → Digital pin 7
Common cathode → GND
Buzzer:
+ve → Digital pin 3
–ve → GND
Bluetooth module:
GND → Arduino GND
VCC → Arduino 5V
RX → Arduino TX
TX → Arduino RX
I started by defining the pin modes, and in my project, all of them were set as outputs.
Then I checked if there was any Bluetooth signal available. I added an if condition so that:
If 1 is received, the red LED turns on.
If 2 is received, the green LED turns on.
I started by connecting the wires as mentioned above. First, I placed the RGB LED on the board, added the resistors, and connected the wires.
Then, I moved on to adding the buzzer.
Finally, I connected the Bluetooth module.
To start my program, I first opened the application “Arduino BlueControl.”
Then, I connected it to my Bluetooth module and selected the numbers.
I tested it by sending the signal 1, and then tried sending another signal with the number 2.
At first, the commands I gave were only for the number I wanted to turn on. For example, 1 was for red and 2 was for green.
However, since I didn’t specify that the red LED should turn off afterward, the colors mixed and gave me incorrect results.
I fixed this problem by updating the code so that each time I send a command, I specify the state of all three colors (whether HIGH or LOW).
Title of Media
Title of Media
Title of Media