top of page

Project display

Project Brief: 

We are getting to Arduino - physical computing this week! I create a sensor to detect if a user is standing in the right spot. 

At first, I created 2 separate circuits on each site. On the left side, I use the Blink template from Arduino. I first change the LED input to 13, because I use p13 for the blinking panel. Then I change the Delay() to 0.1 seconds to fasten the flashing speed and warn the user that they are standing in the wrong spot. 










On the right side, I plug + into 3.3V and create a regular circuit. When the user spots the right place, the green light lights up. 

Then I tested the switch separately to make sure each circuit worked. And I cut parts of the box, taped them with aluminum foil inside to create the switch. When the user steps on, the circuits close and lights on. 

IMG_3784.jpg

1st prototype display

After setting up the 1st prototypes, I start thinking about the usage and realize it is very limited. For this situation, the right spot switch is very limited. If the user wants a very big RIGHT space, we have to make either a huge sensor for the right space; or multiple circuits for it. This will increase the cost, and not be sustainable. 

I decided to create a sensor, which the green light will always be on. And the green light will have a "breath" effect, just like my laptop's light to indicate that the sensor is running. Also, create another circuit just for the orange light. If the user happens to stand in the "forbidden area", turn the green light off, and the orange light starts to blink. 














Inspired by Arduino's button example, I create another circuit just for receiving the input of the "button" at pin 12. And use the if statement to control the light. If the button receives input, meaning the user stands in the wrong spot, the orange light will start blinking. Else, if the user stands elsewhere, meaning the right spot, the orange light won't blink and the green light will be always on. 

I connect Arduino to my computer and start testing, I notice that something was not quite right. The switch I create barely works. The light just blinks as happily as it wants. Then I print out my buttonState inside Arduino and notice the input data is not stable. 


















Then, I went to google and get information from http://www.gammon.com.au/forum/?id=11955. 
In this article, my switch is noted as "beginner switch", which means this switch doesn't work properly. The input value is floating, just like what I get in my case. 





































Recreating the circuits by following the circuit map they offer. As the red line indicates, this is the circuit that goes directly to pin 12(my button pin) with a resistor. This will create stable input data. And the blue line indicates the switch that goes directly to the ground. if the switch connects, the input data of buttonState will be equal to low. By changing my circuits, I am finally able to make it work stably! 

Screenshot 2022-11-10 112027.png

It was a very rough first week Arduino assignment but I'm happy with getting started with Arduino! I am still a bit confused about the code format in Arduino but I look forward to learn more!  

bottom of page