
After the push button switched is closed and then opened, the Arduino on-board LED is switched on for two seconds. This configuration is used on Keyes modules, but it is still recommended to check your module with a multimeter to make sure that this is indeed the correct configuration.Īlternate Push Button Module Arduino Circuit Push Button Module Arduino SketchĬhoose one of the following sketches, depending on if you wired the push button module to use the resistor as a pull-down or pull-up.īoth sketches monitor the pin that the push button module is connected to. If your push button module is configured with the 10k resistor connected between pins 1 and 2 of the module, then choose one of the following circuits. Geekcreit Push Button Module Arduino Circuit Alternate Push Button Module Circuit

The circuit on the right is used with the pull-up resistor Arduino sketch below. The circuit on the left is used with the pull-down resistor Arduino sketch below. Arduino pin 2 is used in the sketches below, but can be changed.
#Pushbutton arduino how to#
Geekcreit Push Button Module Circuitīelow are two circuits that show how to wire the Geekcreit push button module to Arduino.

A different Arduino sketch or program is required for each different wiring configuration. The push button module can be wired to an Arduino using the 10k resistor on the module as either a pull-down or pull-up resistor. There are two different push button modules and two different ways that each can be configured.

Before continuing, refer to the push button module pinout to determine the configuration of your push button sensor module.
