Do any of the labs that were covered in previous weeks that you haven’t already done, and come up with a simple application using what you’ve learned from them.
I created a small project using FSR and three yellow led lights. I wanted to use the brightness of lights to represent love and when you give more pressure, the brighter the lights are. The concept is to give back the amount of love you give by giving you the light/hope. For the rest of the time, I worked on labs.
Previously, the code made the lights dim when I put more pressure. I then used 255 to minus the analogRead(A0)/4 to create the impact where more force applied generates brighter lights.
Problem encountered during lab – solved
When I was working on the button labs, it has a presscounter to assess how many times the buttons were pressed. But upon each press, it generates very high numbers. I was quite confused but I then figured it out by adding a simple line of code in the if statement to make the lastButtonState = false.
I also worked on servo and played around with the map function.