the idea for this week the assignment was
Communicate wirelessly with a Smart Circuit via a Graphical User Interface (GUI) on your phone or PC
inspired by smart home feature when there is a flame or something emergyncy the fan should be on an alarm from buzzer which be controlled by mobile application
https://www.pinterest.com/pin/402087072964971005/
This assignment's idea is a Bluetooth control circuit for a small fan that was in the previous week to be controlled by a smartphone.
Bt teminal (mobile application ) use to control the arduino by Bluetooth
5V Adaptor for the Arduino, fan and Bluetooth module.
Fan 5volt
Bread Board.
Buzzer
Arduino Uno
Jumper wires.
Bluetooth module HC-05.
1- Circuit main power supply:
I used Arduino 5v output and connected it to
breadboard (+,-) terminals to feed all other components
2- Bluetooth module:
Will communicate with the mobile application (INPUT)
Receive commands from the paired mobile
Transmit these data to Arduino
3- Bluetooth module wiring:
Its VCC is connected to breadboard +
Its GND is connected to breadboard -
Its Tx pin is connected to Arduino Rx pin1
Its Rx pin is connected to Arduino Tx pin0
4- Buzzer (OUTPUT)
Its + terminal is connected to Arduino pin 8 digital OUTPUT
Its GND is connected to breadboard - terminal
fan (OUTPUT)
Its + terminal is connected to Arduino pin 7 digital OUTPUT
Its GND is connected to breadboard - terminal
At this stage, I started creating the variables and defining the components connected to the Arduino pins in terms of whether they are input or output
In this part of the code, I used the While Loop and IF, else Condition Loop to control the fan with a smartphone. When we press button 1, the motor works and the buzzer beeps for half a second and when another button is pressed the motor stops working
While testing the project , the data was not received by Arduino and the code was not working.I found that the Tx of Bluetooth is connected to Arduino TX , and Rx of Bluetooth is connected to Arduino RX. and then i put them in the correct pins and it worked well after