the idea of this week's assignment is to communicate wirelessly with a Smart Circuit via a Graphical User Interface (GUI) on phone or PC.
we worked with the RGB LED before but I never made a project with it, because it was a bit confusing to me I preferred not to use it if I have other options, but this week we don't so I tried to finally break the barriers.š¤£
So this circuit is controlled wirelessly from the serial monitor, and depending on the reading from the numbers entered it turns on certain color or makes a noisy sound.
Material:
-Breadboard.
-Jumper wires.
-RGBLED
-Resistors 220u.
-Arduino UNO.
-Buzzer.
-Bluetooth module
I used Autodesk Tinkercad for circuit simulation.
and Arduino IDE to write the text code and upload it to Arduino UNO.
Designing steps:
I connected the RGB LED and the buzzer with the Arduino
-Then I wrote the text code as follows:
- the character variable will be for the incoming data from the serial.
- I identified each pin (2,3,4) for the RGB led, and 10 for the buzzer.
-Then I set up all the pin modes as outputs.
-In the void loop the first while loop indicates that as long as there is no data entered, don't print anything.
-If any data was entered a comparison will occur:
-If '1' was entered; the red color will turn on and the other colors will be off.
-If '2' was entered only the green color will be on
-If '3' was pressed, only the blue color will turn on.
-If '4' was entered the buzzer will make a sound for 1 second and then everything will be off.
First, I connected the circuit as I did in the simulation.
Then I tested the circuit with the Arduino application and it workedš„³
I searched for the datasheet of the RGB to know its wiring.
-I also reviewed the EOW tutorials to connect the Bluetooth module and read from the serial.
I couldn't work with the application at first because it couldn't read the HC05 module, I tried different devices but it still doesn't work, I also changed the module but I had the same problem, finally my friend who was helping me cause she has Android software on her device tried to connect to the Bluetooth module from the device itself, it was paired successfully and then it showed up on the application.
I now know how to deal with the serial monitor, how to wire the Bluetooth module, and how to control the circuit wirelessly which will help me to do the same thing in my final project.
we got to built the cutest little robot arm everš¤©