I want to turn on/off the lambs from my phone, adjust the brightness and change the colors of the light depending on my current mood. Also, I want to open music.
So, I will build a simple smart circuit that contains 2 RGB LEDS and buzzer that I will control them wirelessly.
I will Use the Android GUI to control the action components.
Software
Fritzing
to draw the circuit diagram
to simulate the circuit of the game before making the real circuit
For writing the code and run it
for controlling in the circuit
Components
Breadboard
for connecting all the components
Arduino Uno
for connecting all the inputs and run the device
for communication with mobile application
2 RGB LEDS
for the light
Buzzer
to produce a sound
Jumper Wires
to connect the components with Arduino and Breadboard
Arduino cable USB
To connect the Arduino with laptop
Circuit View
Firstly, I used Fritzing to design my circuit
Then, I used Arduino IDE to write the code.
At first, I defined the inputs pins as integer values, every pin with its number.
3 pins for RGB led and 3 pins for another one.
pin for buzzer
And character variable with initial data =0
Then defined the color lights and buzzer as outputs
The first Case: When the user click on the button no.1 , the first led will lights red, and the other blue.
The second Case: When the user click on the button no.2 , the first led will lights green, and the other blue.
The third Case: When the user click on the button no.3 , Both of LEDs will light the result color from mix between red, blue, and green.
The fourth Case: When the user click on the button no.4 , the first led will light blue, and the other green.
The fifth Case: When the user click on the button no.5 , Both of LEDs will turn off.
The sixth Case: When the user click on the button no.6 , the buzzer will produce a sound.
At first, I connected the components in the real circuit, and connected the Arduino with laptop using Arduino cable USB and uploaded the code but without the Bluetooth module.
After uploading, I connected the Bluetooth module with the circuit and run the code.
Then, I downloaded the Arduino Bluetooth Control application from Google Store and opened the Bluetooth on my phone and paired it with the module, and finally now I can control in the circuit using the application by pressing on the buttons from 1 to 6 and every buttons have different actions, as shown in the video.
When I upload my code, this error is shown to me. So I asked Menna and she told me that I shouldn't connect the Bluetooth module while uploading the code.
I learned how to control RGB LED using serial communication via Bluetooth, and I will use the same case in my final project.
I made a micro robot arm with my team mates Ahmed Osama and Khodary using 3 servo motors.
We learned how to make a pattern game using buttons connected with Arduino via wires. we should write the code in Arduino IDE then connect my Arduino board to the computer and upload the Arduino code, Then we should open another software "Processing-4", and write another code for the game and connect it with the same port, and finally run it.
Eng. Menna learned us how to design using Inkscape and I designed those medals then fabricated them using the laser cutting.