Assignment for this week is to Design ,Communicate wirelessly with a Smart Circuit via a Graphical User Interface (GUI) on your phone or PC.
In fact, the idea of the device came to me because I always forget where my wallet or glasses are
The idea was inspired by the smart watch, as it sends an alarm to the mobile phone. When I press a button on the watch, the mobile phone rings
But my idea is simply that this device be attached to the wallet, for example
When I press a button on the mobile phone, the device rings and lights up, so I can tell where the wallet is
I named it Ringo :D
Arduino ID
to Write the code
Tinkercad portal
to build and simulate the circuit online
Arduino Bluetooth Control application
Design circuits on tinkercad using this component :
1- Breadboard
2- Arduino Uno
3-bluetooth module
4- led
5- one resistors
5- Buzzer
7-jumber Wires
breadboard
Arduino uno
Resistor 220 ohm
jumber Wires
RGB Led
buzzer
bluetooth module
First Step
Design Circuits on Tinkercard
I begin with open the tinkercad and drag and drop the component in the working area then built the circuit as shown in the image below.
The device is a Ringo the input is bluetooth and the outputs are lighting LED and Buzzer.
I begin with open the tinkercad and drag and drop the component in the working area then built the circuit as shown in the image below.
I used the Tinker cad to simulate the circuit and building the coding of the Arduino Uno with the blocks code method.
First, i choose the Ardunio Uno, mini breadboard, buzzer, Rgb Led ,and resistors of 220 ohm.
i placed the LED in the breadboard On the upper Center side.
i placed the bluetooth in the breadboard On the upper left side.
connect the negative leg of LED with a resistor on the breadboard.
connect the Red leg of LED with a Wires on the Arduino (pin 12).
connect the Blue leg of LED with a Wires on the Arduino (pin 8).
connect the negative leg of bluetooth with a Wires on on the breadboard..
connect the Positive leg of bluetooth with a Wires on on the breadboard..
connect the RX leg of bluetooth with a Wires on the Arduino (pin TX).
connect the TX leg of bluetooth with a Wires on the Arduino (pin RX).
i placed the Buzzer in the breadboard On the upper right side.
connect the Positive leg of Buzzer with a Wires on the Arduino (pin 6 ).
connect the negative leg of Buzzer with a Wires on the Arduino (GND).
circuits on tinkercad
Second Step
(coding)
Before writing the code on Arduino IDE, and connecting the real components, I drew a flow chart and pesuocode for inputs and expected outputs of the circuit that code is supposed to do.
(coding)
This code initializes several variables and sets up a basic structure for the Arduino microcontroller to execute.
The first four lines declare integer variables redOut and blueOut with values 13 and 12 respectively, a constant integer buzzer with value 6, and a character variable incomingData with initial value '0'.
The next line defines buzzer as 6 using the preprocessor directive #define.
The setup() function initializes the serial communication with a baud rate of 9600, sets the BLueOut, buzzer, and redOut pins to output mode using pinMode() function.
The loop() function is where the main functionality of the code lies. It contains a while loop that waits for serial input from the communication port. Once input is received, the incomingData variable is assigned to the value using the Serial.read() function.
The code then checks the value of incomingData using an if-else statement. If the value is '1', the redOut pin is set to high, blueOut pin is set to low, and buzzer is set to maximum volume using analogWrite() function.
If the value is '2', blueOut pin is set to high, redOut pin is set to low, and buzzer is turned off using analogWrite() function.
If the value is anything else, both redOut and blueOut pins are set to low, and buzzer is turned off using analogWrite() function.
Third Step (Circuit)
Design Circuits on Real and test it
when pressed on number 2 the led lighting Red
when pressed on number 3 the led lighting Blue
when pressed on number 1 the led Off
finally the circuit worked
The RGB LED is connected to 2 resistors 220 ohm. The 220 ohm resistors is used as the LEDs take voltage less than 5V. In order to protect the LED from burning,
connect the Red leg of LED with a Wires on the Arduino (pin 12).
connect the Blue leg of LED with a Wires on the Arduino (pin 8).
connect the RX leg of bluetooth with a Wires on the Arduino (pin TX).
connect the TX leg of bluetooth with a Wires on the Arduino (pin RX).
final step i placed the Buzzer in the breadboard On the upper right side.
and then test it
Video of electronic Circuit
At first, when I pressed any number, the Bluetooth did not receive, then after many attempts, I discovered that the problem was in my mobile, so I took another phone and tried Bluetooth reception from the mobile and it worked effectively
I used more than input and output great challenge And this is help me in the final project, and in final project i will use module
The extra session was nice, Asmaa explained how to make a pinour mask using the LED
on that week we have Activity to To implement task as a group of 2 , my group was with Ahmed
the Activity was:
Program, assemble, and wirelessly control a Micro Robot Arm.
parts of Micro Robot Arm
Testing the project
Then we played a collision game with Micro Arm