Questions tagged [button]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
447 views

Disable other buttons while one of buttons is pressed

I'm making a project with three buttons. What I'm trying to do is to disable other buttons (make them not respond to a click event) when one of three buttons is pressed. For now I have this code: ...
1
vote
1answer
49 views

Not being able to use pushbutton

I've been trying to detect a push button based on this tutorial, but due to my lack of skills/knowledge I haven't been able to make it work, could you guys point out what I'm doing wrong? Any help is ...
1
vote
1answer
339 views

Why is my LED blinking?

I have this simple push button schematic: The idea is that the LED is on as long as the button stays pushed, with the switch closed. The code is below: int ledPin=10; int switchPin=5; void setup() {...
0
votes
1answer
211 views

Trying to start a timer to change lights when a button is pressed

I am trying to setup a series of lights (traffic lights) that change based on a timer that begins when a button is pressed. The goal is to use the lights to track how long its been since you pressed ...
0
votes
1answer
668 views

IR remote unstable button numbers

Question Is there a reason for unstable button numbers of an IR remote? Desciption I wrote a remote class where I identify the pressed number of the remote to set states. But however I get never ...
1
vote
2answers
1k views

Why is my pushbutton always reading LOW?

I know this is ridiculously simple task but I spent the last two hours trying to get this to work and it is not working. I don't have an Arduino but I have an ESP8266 Huzzah Feather which is ...
0
votes
3answers
51 views

Only return button state once in X amount of time?

I want to detect if a button has been pressed, but what I don't want is for it to keep returning the "pressed" state more than once within a second or two. For example, with this code: void loop() { ...
0
votes
1answer
12k views

Integrating 2 push buttons to toggle the LED ON and OFF

Hey guys need your help in verifying out this program about toggling the LED ON and OFF using 2 push buttons.What i actually want is to let my LED stay ON when i press and even leave the push button-1 ...
1
vote
1answer
263 views

LED and LCD game

I am making a game where four different colored LEDs are flashing randomly, and when the green LED lights up, the user presses a button. If the user pushes the button when the LED is green, I want my ...
0
votes
1answer
5k views

How to get a button state change within a for loop?

I have a for loop inside my void loop() that triggers a piezo. What I want to happen is when I press a button, it breaks the loop of the piezo, but right now, it's as if it isn't detecting the button ...
0
votes
1answer
925 views

Arduino metronome - Change time signature on button press

/**************************************/ const int lowestPin = 1;//the lowest one attach to const int speaker = 13; int ts = 4;//how many beats you want int count = 1; const int keyPin = 12; int ...
-1
votes
1answer
263 views

Arduino LiquidCrystal_I2C fast overwritting

I have an arduino board connected to 2 temperature sensors, 2 switch buttons and 1 lcd display. When the switch button changes to off, "off" is printed on the lcd display. When the button state is on,...
1
vote
2answers
6k views

Detect how long a push button is being pressed?

I would like to detect how long the state on/off is going on for. Is there a way to do that? I would like to do that for two reasons: I would be able to make a very simple toggle button. (I know ...
0
votes
1answer
714 views

How to change Void with button press

I have 2 buttons and 2 voids (blink_slow) (blink_fast). i need to be able to press button 1 and blink-slow void will run, then press button 2 and blink fast will run. none of my code works, any idea ...
0
votes
1answer
101 views

Changing how a longpress is executed

I have an RGB LED common Anode attached to my Uno and this code detects a long press to turn the LED on and off. Short presses cycle through colors, then off. The problem is that a longpress is 2+...
2
votes
2answers
323 views

Arduino with multiple buttons - will power be an issue?

I have a spare Arduino Uno lying around, which I figured I could attempt to turn into a game controller. First clear issue, that immediately popped up, was that there are not enough digital input pins ...
2
votes
4answers
854 views

Why doesn't this debounce function work?

Edit 2 I made a function that works, but I'm still confused about just one thing... I'm very confused about how variables work in C++. In this program... boolean debounce(void) { static ...
1
vote
1answer
3k views

What is the correct way to wire a piezzo buzzer with a potentiometer and a button?

I'm working on a morse transmitter (kind-a), this how it looks like now: It's working, but is it correct? My piezo buzzer is 3-24V. I use the potentiometer as a volume control. The button is for ...
1
vote
2answers
3k views

are 3 connections necessary for a push button?

I'm referring to the 5th circuit (see below screenshot) of the sparkfun manual came with the arduino uno. Instead of connecting all three of the (+) (-) and the digital pin to each push button, can I ...
3
votes
1answer
336 views

Controlling relays with IR and button

What I have: 1 x 8 channel relay 1 x IR receiver 1x Arduino Uno 1x momentary switch 1x breadboard 1x 10K resister I think the wiring is all ok as for the most part things are working as they should.....
3
votes
1answer
703 views

sending ctrl-z in a struct?

I have a set of buttons wired to an arduino leonardo that are meant to send either single keystrokes to a computer "a, b, c..." etc, or a key sequence like ctrl+z (to perform an undo command.) ...
1
vote
2answers
1k views

Instead of 1 and 0, make display say On or Off

So for my project, I am making a button that turns on and off an LED, but also display the state of the led on an LCD and by Serial. But my issue is, I don't want it to just show a 0 or a 1, I want ...
2
votes
1answer
889 views

Arduino sending keystrokes via push-buttons. Proper bouncing and manually setting buttons?

I have a simple set of 8 push buttons wired to a Teensy 3.2 board (which uses Arduino via Teensyduino plugin). The 8 buttons are on pins 1-8 and their common ground line (one line soldered to each of ...
1
vote
2answers
3k views

How to simulate delay() to debounce mechanical button using millis()?

Im trying to use the millis() function as a replacement for the delay() function in order to debounce a mechanical button. This is for an electric drum kit I am building. Im using a teensy Arduino to ...
1
vote
1answer
842 views

Debouncing a limit switch in Arduino ISR with delays

I have a limit switch attached to an arduino Mega 2650 for motion control. The limit switch's two Normally Open contacts are connected to an Arduino Pin and ground, such that when the Limit Switch is ...
1
vote
1answer
160 views

Help with button library, hold>2s doA else doB

I'm using JChristensen's Button Library to debounce my buttons and provide extra functionality. I'm trying to use his press & hold function to do something if the button is pressed and held for ...
1
vote
1answer
61 views

How is LED powered when PIN 2 is disconnected?

Using the Arduino tutorial "Button", I have noticed that if I totally disconnect Pin2 from the circuit, the LED comes on dimly. I am trying to understand HOW this happens. Is it simply due to being ...
0
votes
2answers
550 views

After moving project from Arduino Mega to Due, pushbuttons now erratically toggle multiple buttons

I've had a project running successfully for months on an Arduino Mega, and today I tried to swap the Mega for a Due to increase the speed. After making the change, the entire project is working ...
2
votes
1answer
113 views

1x4 Button membrane help

Im trying out this membrane from Adafruit that i bought last week but i have a little issue. ITS SO SENSITIVE! i as so just touch it with my finger and it transmits!. Anyone that has worked with this ...
0
votes
1answer
511 views

Buttons and LED

I am creating a program that turns on and off an led. When two buttons are considered "high". But there is a twist, The first button needs to stay "high" until the second button is pressed and the led ...
2
votes
1answer
1k views

Control servo motors with buttons and via web application

I have this assignment and I have been tinkering a long time about it. I need to make a simulation of a parking lot where servos would represent the ramps. I will be using 2 Arduinos running the same ...
2
votes
1answer
6k views

Newbie Question with 4 pin button

I suspect this is a very Naive question. But the answer will teach me a lot. Why does this circuit work when I connect the Digital Input (Digial Pin 2) to Pin 4 of the push button. But does not when ...
2
votes
0answers
124 views

Creating a keypad matrix that will communicate wirelessly with an Arduino Uno

I have a 30 button matrix and I would like to use a keyboard encoder to decipher what button was pressed. I would like that information (what button was pressed) to be wirelessly sent to my arduino ...
0
votes
2answers
387 views

Buttons for LED strip only work when held down

I am trying to make a 24 button board that assigns different methods to each button. When a button is pressed, it should interrupt the method of the previous button and begin the new method. Currently,...
0
votes
2answers
883 views

Multiple buttons activating different methods for an LED strip

I am trying to use different buttons to activate different methods for an LED strip. However, when one button is pressed after another has been pressed, I want it to interrupt the first buttons method ...
0
votes
2answers
826 views

Delay workaround needed for RTC and LCD-shield buttons

Following configuration: Arduino UNO R3 Real Time Clock DS1307RTC LCD1602 Shield with buttons Photo resistor DHT11 (Temp & Humidity Sensor) I need the function delay(1000) to display the seconds ...
1
vote
3answers
851 views

Detect button on a ground line (reverse eng)

I've found a circuit board that has a couple of circuits (buttons, IR Receiver, LED, USB). The thing is that following the line for interfacing the buttons I came across what seems to be like buttons ...
0
votes
1answer
66 views

Finding connectors for push button component

What type of connectors would I use for these buttons?: http://www.adafruit.com/product/1477 They sell wires with the connectors already crimped on, but I only need the connectors. I found https://...
2
votes
1answer
2k views

How to detect if more than one button was pressed

I am designing a turn signal bicycle blinker using two pushbuttons as input, one for each side, with a corresponding light for each button. The idea is this: Pressing one side makes same side start ...
11
votes
4answers
5k views

Choosing wireless tech for lowest possible lag

I am drafting a pub quiz project, where the Referee gives a signal and multiple players push their buttons. The first to push wins the right to give an answer. I want all buttons (referee's + X ...
1
vote
1answer
1k views

Using shiftin() and shiftout() with the same circuit - what to consider?

I am designing a smart (or at least I hope so) onboard bicycle light system. The system will have an Arduino (currently prototyping with UNO) and a subsystem composed of a "panel" of buttons and leds. ...
14
votes
2answers
952 views

How to avoid that my arduino clicks eternally?

I have accidentally implemented a program that imitates the click of the mouse. The problem is that now I can´t delete the program because each time that I connect the USB, the computer starts ...
2
votes
0answers
44 views

Connect push button to ArduiMU

I've got an ArduiMU V3+ and would like to connect an ordinary push button to it. How would I connect it to it.
0
votes
1answer
506 views

Pressing button stops listening on nrf24l01

I have been tinkering for 2 days to manage send and receive between 2 arduinos. My code is bellow: Arduino 1: #include <SPI.h> #include <RF24.h> #include "printf.h" #define LED 2 #define ...
2
votes
4answers
11k 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 = ...
7
votes
7answers
15k views

Good button debouncing/stateChange library

I need debouncing/stateChange for a push button configuration. Is there a good library for debouncing/stateChange buttons in Arduino (without delay)?
1
vote
2answers
627 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 ...
1
vote
1answer
4k 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
2k 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
3k 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 ...

1
3 4 5
6
7