Skip to main content


Push Button Sensor Arduino Compatible

Arduino Compatible Push Button Sensor


1 $3.95


This sensor allows you to control your Arduino project with the press of a button. It's perfect for whenever you need a simple input in your project.

Test Code

int Led = 13; // define LED Interface
int buttonpin = 3; // define the key switch sensor interface
int val; // define numeric variables val

void setup() {
pinMode(Led, OUTPUT); // define LED as output interface
pinMode(buttonpin, INPUT); // define the key switch sensor output interface

void loop() {
val = digitalRead(buttonpin); // digital interface will be assigned a value of 3 to read val

// When the key switch when the sensor detects a signal, LED flashes
if (val == HIGH) {
digitalWrite(Led, HIGH);
else {
digitalWrite (Led, LOW);


  • Push button switch suitable for Arduino projects
  • Digital switch output (0 & 1)



Digital switch (0 & 1)

Board Colour





You Might Also Like

All prices are in Australian Dollars and include GST. GST will be removed from your order if you are ordering from outside Australia.
Products may differ from pictured.
All trademarks and trade names are the properties of their respective owners. Wiltronics disclaims any proprietary interest in trademarks and trade names other than its own.

Push Button Sensor Arduino Compatible



We use cookies to ensure you have the best experience on our site. If you continue to use this site you consent to the use of these cookies. OK

Find out more in our Privacy Policy