A button is a simple input component which responds to being pushed by a user.
-1
votes
1answer
45 views
Help Improving Debouncing
In short, I am attempting to debounce several buttons using something like a while loop instead of delays.
This code runs in a box with a series of buttons on it, if the correct sequence of buttons ...
3
votes
2answers
56 views
Update variable using buttons
I made a part of code to change the temperature limit for alarm system. On warm days user have to change the temperature limit with buttons and OLED display.
The question is: How can the variable ...
0
votes
1answer
29 views
OnKeyPress in a arduino
So, I have 3 buttons to a arduino.
I want to detect the button press on the 3 of them.
For that, i've created a function:
int OnKeyPress (int port) {
int LastState, BeginState, r;
r = 0;
...
2
votes
1answer
56 views
Use transistor to press button on external device
I have a small device with a simple push button. I'd like my Arduino to be able to make the device register button pushes. It seems like the best way to do this is to use a transistor to close the ...
0
votes
2answers
54 views
How to count the number of button press then play sequence..?
when i press the button once, sequence s1() play.
when i press the button twice, sequence s2() play.
when i press the button thrice, sequence s3() play.
when i press the button 4 times, ...
0
votes
0answers
94 views
Connecting to WiFI through WPS (ESP8266 Sparkfun Shield)
I'm trying to connect my arduino to my wifi network using WPS
push button but I'm not sure how to set it up. There are no examples of this in the library and some googling didn't reveal anything ...
0
votes
3answers
44 views
Why isn't this pushbutton program working?
Here is my circuit:
and here is my code:
int LED = 13;
int BTN = 7;
void setup() {
pinMode(LED,OUTPUT);
pinMode(BTN,INPUT);
}
void loop() {
if(digitalRead(BTN) == HIGH) {
digitalWrite(LED,LOW);
}
...
0
votes
0answers
35 views
Button interruption using ESP8266-12
i'm trying to use a button interrupt on gpio5 of the ESP8266-12 but i have a problem that the interruption didn't work . is there someone who tried this and can help me ? this is my code .
# include ...
0
votes
1answer
40 views
Homemade fan - motor madness
i hit the forums again with my homemade fan idea, this time i got the right servo. everything works fine until i try turn up to the 2nd speed of the servo, the buttons just go mad and the response in ...
0
votes
4answers
100 views
Can I make so when I press a button on my Arduino Uno board, it will press a key on my computer? [duplicate]
I looked up the question before, but they only gave answers for boards that are not the Uno. Is there any way to make it so when I press a button on my board, it registers as a key press on my ...
0
votes
1answer
23 views
Servo Speed Changer with Buttons
ok so yesterday i was in trouble with the buttons, with help from you i got over it and everything worked fine with the 1st speed of the servo, then i added the other 2 speeds and it looks like it all ...
0
votes
0answers
30 views
Button used to add or substract from “x”
I'm using an Arduino UNO and im trying to make with 2 push buttons 3 diffrent speeds for a motor. I started with the base code for the buttons and then im gonna add the motor but i kinda got in a bit ...
0
votes
1answer
62 views
Stepper Motor Button Press
I am having difficulties programming what should be a simple sketch that gets my stepper motor to run at one step per second indefinitely at the press of a button and then stops at the press of ...
0
votes
2answers
47 views
Where can i get touch sensitive buttons with RGB-LED like in Ableton Push
I am searching for this component: a touch sensitive button with LEDs like in the Ableton Push or in other Launchpads. Does anyone have an idea about where I can buy something like this? The best ...
0
votes
2answers
81 views
How can I make push buttons react to being pressed instantly?
I am making an Arduino alarm clock. I am checking for the state of a button. If it is clicked, I increment the button counter. If the counter is divisible by 2, it is mode 0, if not, it is mode 1. I ...
0
votes
1answer
66 views
Button Relay Control
How can I fix this sketch to make it so that once the button is pressed, it performs some action for a certain amount of time and then returns back to a low state until it is pressed again. For ...
1
vote
3answers
57 views
80 Apple Homebuttons and a steppermotor [closed]
I am graduating in a month and I want to make an installation with 80 apple homebuttons which are connected to a stepper motor. The idea is that each button that is pressed, turns the stepper motor ...
1
vote
1answer
51 views
Trouble using lcd.readButtons() in RGBLCDShield library
I am trying to create a state machine that loops in whatever state it's in until a button is pressed. I am using the Adafruit_RGBLCDShield library along with the LCD shield and 16x2 display. For ...
0
votes
1answer
37 views
Standard Arduino kit button caps?
Are there any caps available for these buttons, or am I better off using other, more stylish buttons if I want to make a presentable arduino-based gadget?
The circular hole drilled in their square-...
1
vote
2answers
791 views
How to turn two LED's on and off with one button?
I was wondering how to write a code that would do this, WITHOUT using IF and ELSE: when the button is pressed, one LED is on and the other one is off, but when the button is not pressed, the LED that ...
0
votes
2answers
405 views
press windows key using keyboard.press();
Is it possible to allow an arduino Leonardo to simulate pressing the windows key using the keyboard.press(......); command? If so, what is the required value?
0
votes
1answer
29 views
upcoming voltage from a button
i use this simple code for arduino :
const int buttonPin = 2;
const int ledPin = 13;
int buttonState = 0;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
...
1
vote
3answers
194 views
Breaking a switch case from an ISR
I'm struggling with something. My CPU sits in a switch case state machine like this:
switch(expression) {
case constant-expression_1 :
statement(s);
break; /* optional */
case ...
0
votes
1answer
40 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
24 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
35 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
45 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
68 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
96 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
30 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
175 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
95 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
113 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 ...
1
vote
1answer
112 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
68 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
142 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
119 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
43 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+...
3
votes
2answers
104 views
Arduino with multiple buttons - will power be an issue?
I have a, hopefully simple, question related to creating a circuit with an Arduino board; feel free to dismantle the idea, I'm, unfortunately, not well-versed in electronics.
I have a spare Arduino ...
1
vote
4answers
232 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
407 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
78 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 ...
2
votes
1answer
60 views
Noob coding - don't know what's going wrong - controlling relays with IR and button
I'm new to the forum, electronics and coding...so pretty green really but really enjoying messing around with the arduino so far and I think I'm picking up some skills just by messing around.
I ...
3
votes
1answer
126 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
141 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 ...
1
vote
1answer
251 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
217 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
97 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 ...
0
votes
0answers
121 views
Remote iPhone home button
I wanna create this type of product
http://www.satechi.net/index.php/smartphones-and-tablets/accessories/remotes/satechi-bluetooth-button-series-home-button
It's an external home button, but I don't ...
1
vote
1answer
99 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 ...