Arduino #4 - PB (Momentary Contact)

Design a Momentary Contact Pushbutton (press pushbutton AND release - LED comes on; press again - LED goes off). Your speed of depressing the pushbutton is 10-40 ms, but Arduino scans the PB circuit 1,000 times per second, so it's a 50/50 probability that the scan is correct unless you add de-bounce. Banzi explains how to implement software debounce with a series of exercises on pp 42-49. There are three examples - 3A, 3B, and 3C - with the final sketch in 3C on page 49. I want you to implement the Banzi sketch (3C), but add the Boxall hardware with the capacitor - see Boxall pp 63-70 using a small capacitor. Follow the Banzi sketch (3C). If you follow the Boxall Sketch (project 4), you will need to modify the Boxall Sketch (Boxall Project 4 - pg 69-70) so that the LED remains on after pressing the PB once, and the LED goes off after pressing the PB a second time.

Create a single post for this project on your student web pages. Reflect on how many and what kind of debug errors you had (hardware, schematic, sketch/software, or reading/understanding the assignment). Include a photo of your hardware and a 5-15 second video demonstrating the intended application with and without the hardware debounce (with and without the capacitor). Comment in your reflection which implementation (hardware or software) you think works better.

PB Momentary Contact (uses capacitor to de-bounce)

Arduino 4 - PB Momentary Contact.mp4

PB Momentary Contact - no false PBs in video

Light goes on or off with a single click

Arduino 4 (Banzi Example 3A-3B-3C - pp 42-49).pdf

Banzi explains how to implement software debounce with a series of exercises on pp 42-49. There are three examples - 3A, 3B, and 3C . I want you to implement the Banzi sketch (3C)...

Arduino #4 (Boxall Project 4 - pp 63-70).pdf

...but add the Boxall hardware with the capacitor - see Boxall pp 63-70 using a small capacitor.