A button is a simple input component which responds to being pushed by a user.

learn more… | top users | synonyms

2
votes
3answers
89 views

My button control working in reverse

I built this circuit to learn button control. But my code (or button) is working in reverse. I want to initialize led flash effect when the button is pressed with this code buttonState = ...
0
votes
0answers
44 views

multiple button problem arduino uno stopwatch [closed]

There are four buttons. All of them control a stopwatch. if i push buttonx rest must disable. and first choose between buttons is controlled by the user. i can't solve the problem of first picking ...
0
votes
4answers
42 views

good button debouncing/stateChange library

I need debouncing/stateChange for a push button configuration. Is there a BEST library for debouncing/stateChange buttons in arduino (without delay)?
1
vote
2answers
49 views

Fog machine Arduino integration

I want to control my fog machine with an Arduino. Has a simple button that is used to activate the machine. I want to press this button using an Arduino digital output pin, but the fog machine is ...
0
votes
1answer
86 views

Hooking up 12v Push button to arduino uno/nano

I want to use one an push button with an led in middle, similar to this one on eBay. The push button has a 12v input I want to hook it up to an Aduino Uno or Nano. Is there a way to hook it up and ...
0
votes
1answer
134 views

Controlling image display on LED matrix by buttons

Building a 9x9 LED matrix and facing following 2 problems in Arduino code, The current code displays 2 images (using byte arrays and then using bitRead) one by one, each for a certain duration of ...
0
votes
1answer
127 views

Why are pin 18 and 19 always HIGH?

I wired my switch just like in the default button program. I know it works because it works fine on other pins, just not pin 18 or 19. What am I doing wrong? const int buttonPin = 18; // the ...
0
votes
1answer
85 views

Simple Text input using 5 buttons

So I have to get this function done but I'm not so bright and got confused. (excuse me! I'm total noob) The function is basically inputing text using five buttons, directional buttons and an ok ...
0
votes
1answer
53 views

Button reading not going off

I made a circuit which in my intentions would allow me to toggle a LED dimming loop. Problem is that once I push the button the first time pushing it a second time doesn't toggle the LED loop off. ...
0
votes
1answer
60 views

Getting Push Button Logic To Stick?

I'm trying to get a sensor to activate if a push button is clicked. And deactivate when a certain condition is met and reactivate when the push button is pressed again. #include <SPI.h> // ...
0
votes
2answers
95 views

Led on when not supposed to be

So I made a program that controls two LED's when two buttons are pressed, but one of the LED's comes on when the button isn't pressed. And what's weird is that if I literally move around the ...
0
votes
3answers
84 views

Debouncing results in no reaction at all

Update: I changed the code to this, but it does not work either. `if ((millis() - lastDebounceTime) > debounceDelay) { if (button) { //DEBOUNCING if (!button_prev && button) { ...
1
vote
3answers
104 views

Unintended reaction: Sketch makes LEDs turn on and of randomly/LEDs don't react

Update: This piece of code does not do the same as the one in the right answer, it also reacts when one lets go of the button. int button_prev = 0; int button = 0; void loop(){ button_prev = ...
4
votes
2answers
111 views

Performance of internal vs external resistors

Is there any significant performance trade-off between buttons wired with the internal vs external pull-up/down resistors? I see a lot of tutorials demonstrating the use of external resistors when ...
1
vote
1answer
119 views

Resistance in Switch (negative vs positive logic)

I tried in my Arduino the negative logic to get a digital input from a switch (with 10 KΩ resistance). If I want to use the positive logic what kind of resitance I have to use? For me seems that ...
1
vote
1answer
272 views

Turn Arduino on only by double tapping switch?

I don't have much experience with electronics. I was wondering if it is possible to create a push button switch, which will turn on the device only if it is tapped twice in quick succession? If it is ...
2
votes
1answer
1k views

Multiple Buttons on Single Analog Pin and Trigger Pin Arduino Uno

I've researched how to attach multiple buttons to a single analog input using a resistor network. Instructables has a good lesson on this: ...
1
vote
1answer
109 views

Why does this button have a connection to ground?

I am testing this basic button example from the Arduino tutorial page. This circuit lets power flow to pin 2 when the button is pressed. When the button is not pressed, the power goes through the ...
0
votes
0answers
202 views

Problems powering stepper motor from web server (button) via Arduino Yun

I have my Arduino Yun set up with a web server. The webpage has a series of buttons on it, which control the buzzer playing various sounds, and a button to control a stepper motor. I'm using the code ...
1
vote
2answers
112 views

Simply Button Problem (Teensy 2.0)

I am getting back into doing some hardware stuff after a fairly long time away and am having a hard time getting back into it. I have a Teensy 2.0 and am trying to run a basic sketch that when a ...
1
vote
3answers
2k views

How to toggle LED on button press

I have want have a LED turn on when I push the button and go off when I push the button the second time. This code doesn't work: const int buttonPin = 4; const int motorPin = 10; const int ...
2
votes
1answer
121 views

Reading button presses with the 74HC4067E multiplexer

My project is progressing quite well, but I am having some issues reading button presses through my MUX. The Goal Cycle through twelve buttons and twelve LEDs. When a button is pressed, light up the ...
2
votes
1answer
63 views

Button to optocoupler to fire camera 4 times

Ok, this is my first project where I've not had @forsvunnet close by to help. I've got a camera connected to an optocoupler, that just fires HIGH then LOW. I can't get a button working with it, so ...
0
votes
3answers
573 views

Why does my wired button always read HIGH?

I have made a simple Arduino program that uses a potentiometer to dim a LED. This program also makes a second LED blink. Finally, I have added a button that controls a third LED; this part of my ...
5
votes
2answers
432 views

How frequently do you need to poll UI buttons before they are perceived as laggy?

Whilst it is possible, and sometimes desirable, to use pin change interrupts to read the state of buttons, it is simpler to poll the state of buttons in loop(). This is a commonly used technique. If ...
5
votes
3answers
279 views

What design patterns can I use to handle user input and display updating?

I've used enough products with embedded microcontrollers and unresponsive UIs to know that it can make or break a product. Even a slight delay or lag between the button presses and the display ...
3
votes
3answers
166 views

Why does my sketch report too many button presses?

I've been using a button to interact with a sketch (on my Uno), and it's mostly working fine. However, sometimes it seems to be detecting multiple presses when it's only pressed once. It's a small ...
6
votes
1answer
203 views

Button state changing randomly

I have a push button wired to my Arduino but it seems to be triggering randomly. I have one pin of the button connected to pin 2 on the arduino and the other connected to ground. void setup() { ...