Back to Parent

Outcome


Intention

Using inputs and sensors, I wanted to create a device that worked as a warning, creating a blinking response when pressure is applied, and if possible have a series of leds turn on as the pressure increases. Thinking about pressure dials and how the dial turns to different colors as the pressure increases until eventually turning red, I thought that this could be a simple interaction translated to light to signals when pressure is applied, and if possible how much pressure.

Process

After completing the practice exercises on inputs and sensors, I started by taking the base setup and code for the light sensor, replacing it with the pressure sensor. Looking back at the pushbuttons, I connected this to the board as well, and restructured my code, so that the button had controlled states, connected to an if else statement. Within this statement here I applied the conditions for the led and included the photoCellReading here, so that there would be two states for the led. Once I had this working, I then progressed to add a second led to my board, but quickly realized that my board was too small to fit multiple leds, and had to quickly drop this idea. But maybe in the future with more time, I can look into using the individually addressable led to signal different stages of pressure.

Product

In the end, I was able to produce a simple circuit that uses a push button to turn on the led, with the condition that when there is pressure applied above 600, then the led will blink. 

Show Advanced Options
Show Advanced Options

Reflection

Overall, I would like to find a way to make the response a little more appealing, and figure out how to make a second and third led work that will each turn on at a different range of pressure. So when the most pressure is applied, all three leds will be on. I did enjoy making this little circuit, and even though I thought that this interaction would be simple, it was interesting to have to think about the way in which this applied in my code, and knowing where and how to apply the else if statements. 

Img 0414.thumb
Show Advanced Options
Img 0416.thumb
Show Advanced Options
Img 0417.thumb
Show Advanced Options
Img 0415.thumb
Show Advanced Options
Drop files here or click to select

You can upload files of up to 20MB using this form.