Back to Parent

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.


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0