I got inspired by connecting multiple things together
DC motor speed Control using potentiometer with L298n - YouTube
Doppler Radar motion sensor RCWL-0516 + Arduino – SURTR TECHNOLOGY
Unfortunately this project I failed to do even how much I tried there is something wrong also I am concerned with time.
So I tried to stop poo and his friends from sneaking to kids rooms I will try to explain more.
In this week I discovered Arduino in a better way and I did code betters than using building blocks
The Idea behind the project is when The Light is off and Motion Detected a Buzzer + LED takes and Action
Arduino IDE software
Tried to use Fritzling I couldn't use it good within the time frame
+
Objectives
1. to make 2 inputs which are ( LDR sensor and Microwave Sensor)
2.to make 2 outputs which are buzzer and LED
Components:
1.RCWL-0516 sensor
2.LDR module
3.Buzzer
4.Breadboard
5.LED
Steps:
1.Connect the circuit as shown in the schematic
2.both sensors have been gone for an individual trial
3. start defining the pins on the IDE
4. we upload the code
5. we try to move around the Microwave sensor while it is dark and while it is light and see the difference.
The sequence of the Code:
1.We define pins function
2.We start asking the sensor if it is light or dark and if there is a move or not
3. while it is dark and there is a move then it will trigger the LED and the Buzzer
4. in Case of light nothing will happen
#define Sensor 2
#define LED 3
int LDR = 7;
int Buzzer = 9;
void setup() {
pinMode(Sensor, INPUT);
pinMode(LDR, INPUT);
pinMode(LED, OUTPUT);
pinMode(Buzzer, OUTPUT);
}
void loop() {
bool Detection = digitalRead(Sensor);
if (Detection == HIGH && digitalRead( LDR ) == 1) {
digitalWrite(LED, HIGH);
digitalWrite(Buzzer, HIGH);
}
else {
digitalWrite( Buzzer, LOW);
digitalWrite(LED, LOW);
}
}
I asked for a lot of help from my instructor at my first try with the DC motor and I had the right code but it didn't work with my Arduino
My group mates helped me a lot to debug and check my code
A lot of challenges this time:
I had my Arduino damaged
I had to learn more about using bool function also and statement
I learnt a lot about if statement
I tried a lot of projects and most of them failed
I was bad at managing time for week 7 and 8
I learned to use the If statement better and also it was great to use more than one condition