Arduino Introduction- Joy Shi

This week in lab, we were introduced to Arduino, in which was something that I have never experienced before. During our lab, we learned the basics of Arduino and how to make a LED light up and blink. It was relatively simple since we had diagrams to look at and follow. However, looking at diagrams did not help me when it came to making my own sensor project.  I personally had to Google multiple times what each part of the Uno board did and how to use it. After understanding a bit more about Arduino, I started on the storyboard and prototype for my project.

Class Introduction to Arduino

 

 

 

 

 

 

 

 

 

 

 

 

 

 

My storyboard is inspired by a problem that me and my roommates have. Sometimes we forget to turn off the lights or AC/ heater in our apartment when we leave. This usually occurs when we are in a rush to leave or trying to catch the bus. As a result, this has led to a pretty high electricity bill over the past few months. This is a bad problem that needs to be fixed, as this is harmful for the environment and also our bank accounts.  

Storyboard

 

 

 

 

 

 

 

 

To solve this problem, I decided to make a buzzer to remind to check if all the lights are off before leaving. The buzzer will only sound for a few seconds and will only buzz whenever motion is detected through the motion sensor. When making this prototype I did rely on YouTube videos to help me. As a beginner, I got confused while watching the tutorial as to where to put the wires and the wires were getting all jumbled up together.  So in the end, I did simplify the tutorial by excluding the LED light and resistor.

The coding part was a bit easier, as I knew what I wanted my buzzer to do. After Googling the codes I needed, I was able to make my circuit work.

Overall, this was an interesting project. The amount of different sensors that could have been used for this project was pretty cool. Just looking at all the sensors available at the FabLab was overwhelming, but this definitely something that I want to learn more about. 

Final product

 

 

 

 

 

 

 

 

Code:

void setup() {

pinMode(6, INPUT);

pinMode(8, OUTPUT);

}

void loop() {

if(digitalRead(6) == HIGH){

tone(8, 400);

delay(300);

noTone(8);

delay(200);

tone(8, 400);

delay(200);

}

else {

noTone(8);

 }

}

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on pinterest
Pinterest