the assignment of this week was about to make a circuit that performs 2 actions with a Bluetooth module that allows the phone to control those actions by the user, so I made a circuit that changes between (5) lights of the room using the mobile app and buzz when lights for the first time and buzz when closes all the lights all of that through a Bluetooth module app.
SO
the two actions are changing lights and buzzing
the photo that i inspired from
I used TINKERCAD software to design the circuit, and after making the circuit on TINKERCAD, I used the real circuit and Arduino Uno to apply the same circuit in reality, I also used Arduino software to make my assignment code then I import it through a USB from Arduino software to the real Arduino slice, I also used the mobile app Arduino blucontrol to link between it, the Arduino and the Bluetooth module to give the permission for actions through it.
the electronic components that I used:
I used the Arduino UNO, Bluetooth module with (1kohm & 2kohm resistors), RGB led with (150-ohm resistor & (2) 100-ohm resistors), a breadboard and jumper wires to connect between breadboard, Arduino, Bluetooth module, RGB LED, and buzzer.
TINKERCAD software app that I used to design the circuit
the circuit on TINKERCAD
the Arduino Bluontrol app that I used through the Bluetooth module
Arduino software that I used to code on it and import the code to the real Arduino slice
the code on Arduino
firstly,
I started to design the circuit at TINKERCAD so I used the Arduino UNO, Bluetooth module with (1kohm & 2kohm resistors), RGB led with (150-ohm resistor & (2) 100-ohm resistors), a breadboard and jumper wires to connect between breadboard, Arduino, Bluetooth module, RGB LED, and buzzer.
for Arduino, Breadboard, and RGB, I connected the (5v) on Arduino to the positive section on the breadboard and connected the GND on Arduino to the negative section on the breadboard then I connected the RGB led on the breadboard using the 150-ohm resistor for the red leg and connected it to pin (5) on Arduino then I used the 100-ohm resistor for both blue and green legs and connected the green one to pin (6) and the blue one to pin (7) on Arduino, then I connected the negative leg of the RGB to the negative section on the breadboard.
for the buzzer, Arduino, Breadboard, and Bluetooth module, I connected the negative leg of the buzzer to the negative section on Arduino then I connected the positive leg of the buzzer to pin (3)on Arduino, and finally the Bluetooth module of course I connected the negative leg in it to the negative section on a breadboard and the positive leg to the positive section on a breadboard then I connected the RX leg on Bluetooth module to the point that connected between the (1k and 2k resistors) and then I took a wire from the other leg of 1k resistor to the TX on Arduino, then I connected the TX leg on Bluetooth module to the RX on Arduino.
secondly,
I started to make the code on Arduino so I started to make a (6) if conditions between the number that I will hold on the mobile and what color should give to the user when clicking on it and also it should buzz when the first color lights and also buzz when all the lights are turned off.
a small brief about what the code I made meaning and what it does:
(first of all, I defined the code outputs which are the buzzer and the RGB were the outputs, and while the Bluetooth module and the mobile app are the controllers of those outputs, so I made a (6) if conditions that are if I click (1) on the Bluetooth mobile app so made the buzzer high, wait 1 second then low ( which means that make the buzzer buzz for 1 sec. then turn it off and make only the green color to light, and if I click (2) then give me ( a cyan color ) and don't turn the buzzer on, and if I click (3) then give me ( a magenta color ) and don't turn the buzzer on, and if I click (4) then give me ( a red color ) and don't turn the buzzer on, and if I click (5) then give me ( a white color ) which means all the RGB sections will be high and don't turn the buzzer on, and finally if I click (6) on the Bluetooth mobile app so made the buzzer high, wait 1 second then low ( which means that make the buzzer buzz for 1 sec. and also turn the RGB off ( and I made the buzzer buzz for 1 second, in that case, to let the user figure out that the light is off now if the user were outside the room).
thirdly,
I started to build the real circuit on a breadboard and Arduino Uno doing the same process that I did on TINKERCAD and after wiring everything I put the Arduino slice cable to it and to the laptop to import the code that I made to it and then the circuit work.
the circuit on TINKERCAD
the circuit code on Arduino
a small screen recorder of the code on Arduino
the circuit pictures
the video of the real circuit works using the Bluetooth app and Bluetooth module
Title of Media
at the end of this week's task, we ( Doaa, Farida, and I) asked Esraa about the circuit that we were supposed to make because we stuck a lot in figuring out what the problem is .. but the instructor Esraa helped us a lot, and also Hussien helped us to solve the problem that we have in the code.
I stuck a lot in making the code because I want to make different lights for the RGB not just the red, blue and green but after a lot of research and opening a lot of tutorials I solve it and I start to build the code with the ratio that should be between colors to make the color I want.
I could use some of the skills that I learned in coding the motor at the end of the week task and also some skills in coding the RGB LEDs in the assignment in my final project m and of course if I had the time to make the mobile app in my final project it will be easier than before because that was the highlight of this week actually.
actually learning how to connect our could through a Bluetooth module using the mobile app was superb actually to deal with and to learn it, also the end of week task (hackathon) with Doaa and Farida to make the fishing game using servo motors and coding them was so cool actually and I will never forget.
At the end of this week, we were supposed to make the (hackathon) in teams so my team was (Farida, Doaa, and I) the task was to make a fishing tool using 3 servo motors and coding them to fish the sea creatures and actually Doaa and Farida were so helpful as teammates and we produce a good work also by the help from the Instructor Esraa .
a small video of the fishing tool that we made