small medium large xlarge

Back to: All Forums  Arduino
Generic-user-small
17 Aug 2013, 00:15
Wang lei (2 posts)

i am fully appreciated your work about this nice book. at the end of this chapter “Bounce start_button(START_BUTTON_PIN,DEBOUNCE_DELAY);I want to konw “START_BUTTON_PIN,DEBOUNCE_DELAY” are working for? thank for your reply.

Maik_schmidt_avatar2_pragsmall
17 Aug 2013, 10:31
Maik Schmidt (117 posts)

Hi Wang!

You can find a complete reference of the Bounce library online.

The declaration Bounce start_button(START_BUTTON_PIN, DEBOUNCE_DELAY) defines a new object of the Bounce class named start_button. Every button has to be connected to the Arduino using a digital pin and START_BUTTON_PIN defines the pin the start button is connected to. In this case its pin 5.

DEBOUNCE_DELAY defines the button’s debounce delay in milliseconds. In this case it’s 20 milliseconds, that is during this period of time the Bounce library will ignore all button activity.

Hope this helps!

Maik

Generic-user-small
23 Aug 2013, 09:08
Wang lei (2 posts)

thank for your kind reply , it is really helpful for me .

  You must be logged in to comment