Digital Input and Output

Analog In with an Arduino

IMG_5720.GIF

IMG_5723.GIF

For these two exercises, at first, I was not able to program the Arduino successfully. The failing message always showed as below. By asking the classmate, I found it was the problem with the setting. After correcting the setting, the program ran well and successfully.

Screen Shot 2021-09-20 at 3.04.17 PM.png

Screen Shot 2021-09-20 at 3.58.25 PM.png

Sensor Change Detection

Screen Shot 2021-09-22 at 12.23.16 PM.png

IMG_5748.GIF

Count button presses:

I added the code used before to make the counting more visualized. Now I could track the counting changes by watching the line's growth.

Long press, short press

I used both the serial monitor and IDE tool to present the low press and short press function.

IMG_5749.GIF

IMG_5751.GIF

Detecting a Peak

At first, I didn't realize that I need to wrap the sensor with strings so that I failed my first try.

After watching the video and wrap them up together (as shown below), I began my second try.

IMG_5755.heic

IMG_5754.heic

IMG_5756.GIF

IMG_5757.GIF