Questions tagged [button]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
27 views

How to program the joystick button to reset everything?

In this project, I'm making a stickman rush game with a joystick. Where when the joystick moves up and down, the stickman also moves up and down. And there are obstacles, that when the stickman ...
0
votes
0answers
27 views

permanent shutdown of the alarm

#include <RTClib.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display int nowHr, ...
3
votes
0answers
70 views

Increase or decrease const byte value inside the code with a push button

I'm kind of new in the Arduino world. I decided to make a self learning project with an Arduino where it controls a conveyor that simply moves from right to left and back again. There is a start and ...
0
votes
0answers
40 views

I need to make button to turn off my alarm on clock

well I get task to make school project alarm clock using arduino, xd as you can see im not very good at it i mean i know something but not everything so please can someone help me, i copied this code ...
2
votes
0answers
36 views

Single LED controlled by two pushbuttons - one of which acts like a toggle switch

Trying to control this LED with those 2 pushbuttons - one button that starts a short flashing sequence, another pushbutton acts like a toggle switch, one press bulb is on, another press bulb is off. ...
0
votes
1answer
47 views

force the state of the output

i have one input and buzzeer output and reset pushbutton if the input is high the buzzer will be on and i want to turn off the buzzer by the pushbutton even if the input still high any suggestions to ...
1
vote
0answers
43 views

Why is my button not working?

I'm trying to making a traffic light for my school project but my button for the traffic light doesn't work. The traffic lights should light up normally but when the button is pressed all LEDs should ...
0
votes
1answer
35 views

Arduino while loop with or condition

How do I write a program to wait (delay) until one out of two buttons pressed? I have written a program to wait until a single button is pressed. It's working fine. However, if I extend it to second ...
1
vote
1answer
37 views

Stepper motor won't change directions!

I am driving a bipolar stepper motor with an a4988 driver using the AccelStepper library. My goal is to press a button and the motor moves CW, then another button for CCW. I have looked at another ...
1
vote
1answer
35 views

Unable to make a really basic sketch work

I've been learning how to encapsulate my code within functions, and one of the examples I worked on is a simple INPUT_PULLUP button. When I upload the sketch from the arduino website everything works, ...
1
vote
1answer
50 views

How to wire and control a 16mm button with 2 legs using arduino?

I can't find any tutorials online explaining how to wire and control a 16mm push button like the one in the picture: Do you have any suggestions as to how use it with an arduino or a raspberry pi?
0
votes
0answers
22 views

How to make my sensor reads when i pressed the button

Hi I'm making a digital fare meter, I have a problem in how my sensor reads when I'd pressed the button(single tap). I need the sensor to read once I pressed the button because when I press the button ...
1
vote
0answers
21 views

Arduino Button switch LED without reset delay [closed]

trying to get a little helper working. Two LEDs, each one is on for 24hrs. Only one is on at the time. There should be a button to switch the states of the LEDs without restarting the delay. Example: ...
1
vote
0answers
62 views

Using AccelStepper to move a set distance while a button is held down

I'm working on a project and using a nema 23 stepper motor and driver. Need to be able to move the stepper 1/32 rotation when I press a button. I need a small delay so I have time to release the ...
-2
votes
1answer
58 views

Push button restarts the arduino [closed]

I have linked an external push red colored button to my arduino but when I press it, instead of giving me HIGH or LOW, it resets the arduino. I am a beginner to this stuff so could someone help?
1
vote
1answer
44 views

Timing push button code

I am trying to time how long button is held for. The code seems to work but with two problems: the millis values are being read wrongly. If you hold the button for 1 second, it returns holdTime of ...
0
votes
0answers
56 views

Problem in interfacing esp8266 with Arduino ide for simple blink program

Arduino: 1.8.13 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory,...
1
vote
0answers
33 views

Will this be possible to do before I even get started. I want to automate my house window [closed]

I will have 2 buttons. Using Adafruit DC Motor Driver https://www.adafruit.com/product/3190 Top button is a function, bottom button is mode. The top button functions. Window 1: Single press will turn ...
1
vote
2answers
69 views

button connection without connection to 5V pin

There are two types of tutorials for buttons: I don't understand how a button on the first image works. Do we just hope that there is some non zero voltage and hope its enough? I think the first ...
2
votes
2answers
54 views

Rasberry Pi Controlling Arduino - Reads “Ghost” Input - Doesn't Complete Logic Loop

I am using an Arduino Atmega2560 clone, I have used it many times before with satisfactory results - although I haven't used it with my Rpi before. My Raspberry Pi is model 4 (B I think?). #define ...
1
vote
1answer
45 views

Question about button circuit

I'm quite a beginner at electronics, but thought I would try venture into it. Currently I'm working on a project where I need to reuse a button module salvaged from some old hardware, but I can't ...
2
votes
1answer
43 views

Adding a common activation pin to a group of buttons

I'm working on an Uno, which has only two interrupt capable pins, but i need at least three buttons to wake it up from its power saving mode. Is there a way to wire buttons such that, in addition to ...
2
votes
3answers
74 views

Can anyone help be get readings off of my potentiometer with a push of a button?

Hi I'm trying to get my Arduino Uno code to work with a in a specific way where if I push a button, the Arduino will read the raw potentiometer value once and if I don't push it nothing happens. https:...
-1
votes
1answer
45 views

Arduino waits until button release to activate

I'm fairly new to arduino, and on my own I'm trying to move a servo to the left and right using 2 buttons. I've got it working for the most part, however when I hold the button down nothing happens, ...
2
votes
1answer
33 views

Input state is stuck HIGH when function called using input also uses same input to call another function

I'm writing a choose-your-own-adventure style project for a class project. My Arduino Uno is set up with a 16-digit LCD display and two pushbuttons with pulldown resistors. I'm wanting each function ...
0
votes
2answers
116 views

How can I add a potentiometer and more buttons to my custom game controller?

I'm new to using Arduino, and know next to nothing about programming. I'm currently trying to add a potentiometer, and possibly a few more button inputs to my 3D-printed guitar controller project It ...
0
votes
0answers
35 views

Playstation module seeming to glitch out

I am not sure if anyone out there is familiar with the PS2X module at all but I am seeming to have a few problems with it. Firstly whenever the square button gets pressed down on by me, all of the ...
1
vote
1answer
70 views

DFplayer, Play sound when pin is high

I have a code here, from DFmini player. I have a tactile switch. when I press it on and release it will play a sound. My question is that when I press the tactile but not release it so I want it still ...
0
votes
1answer
43 views

How might I add a delay, close the servo and go to the start again?

#include <Servo.h> Servo myServo; const int piezo = A0; const int button = 2; const int yellow = 3; const int green = 4; const int red = 5; int knockVal; int buttonVal; const ...
1
vote
2answers
80 views

I need help creating a code that moves a DC motor CW or CCW based off of 2 different buttons

I know I can make the motor move backwards and forwards with buttons but I don't want it to move at full speed. I want it to increment in very small amounts to where it can be adjusted very small ...
2
votes
1answer
87 views

Button to stop a stopwatch not working correctly!

I'm trying to implement a stopwatch with an LCD display, and I'm supposed to be using the attachInterrupt command to catch the button press. The clock runs perfectly, but the button input isn't caught ...
2
votes
1answer
63 views

status whether the switch is connected to arduino or not?

I made a small circuit in which a push-button is connected to Arduino via a pulldown resistor. So, whenever it is pressed it connects to 5V otherwise pulled down to the ground. this is working fine ...
0
votes
1answer
357 views

RGB LED using potentiometer and push button

I'm currently working on an assignment which has to turn on an RGB LED using a potentiometer and button. The problem I currently have is that the button is supposed to change the color I want the LED ...
1
vote
1answer
46 views

Saving a value with a click

I have a rotary encoder and 2 buttons to a. Store the encoder value b. Reset the encoder value to 0. The reset buttons work fine the issue is with the set/store button. Where the value changes without ...
2
votes
2answers
294 views

How do I make LEDs lights up one by one according to how long the button was pressed and hold

In my project, I am trying to create a timer display with LEDs base on how long a button was pressed and hold. There are 8 LED lights in total, when the toggle button was pressed, 1st LED lights up; ...
1
vote
1answer
145 views

Continuous push button detection in for Stepper control

Currently, I've worked on code for controlling stepper motor with pushbuttons. So, basically, I have to press two push button to run forward and backwards. but the problem is when I press the 1st ...
0
votes
2answers
108 views

How do I make my LCD screen scroll text while allowing for button input?

Here's what I want my code to do: This is part of a tea infusing project that would automate the steeping of tea, part of this is initially having a selection of either Black/Herbal tea or White/Green ...
0
votes
0answers
31 views

Button triggering when i get near [duplicate]

I set up a simple code to tell me if the button was pressed or not. When I get within a foot of the Arduino the button triggers. I first noticed this when trying to trigger a servo with a button. I've ...
1
vote
3answers
468 views

using a switch case with a 5-position switch and serial output

I'm trying to get started on developing a menu system for my LCD1602. I have a Parallax 5-position switch (up,down,left,right,center) and I would like to interface the two. I've been trying to get ...
0
votes
2answers
50 views

External Button Interrupt (Digital Pin 3) of Arduino not working

I am trying to execute external button interrupt with Arduino and 16*2 alphanumeric LCD. What I am trying to do is when I press the button then the screen should switch between different options. When ...
2
votes
1answer
71 views

Problems with detecting button digital state

I am trying to start an event after pressing and holding the FLASH built-in Nodemcu button for a specific time, I wrote two functions, one for debouncing and detecting the state, the other is to ...
0
votes
0answers
54 views

problem controlling rgb led with one button

I'm trying to make a lamp which quality to change color by pressing a button, pressing once turns on red, pressing again turns on blue and so on, but I also want it to have a light effect in which it ...
1
vote
0answers
40 views

Button example: resistor vs wire

I am playing with this basic example: Arduino: Button There're a lot of existing questions about why to connect button to the ground. I get the idea more or less. Is done to avoid "noise" during ...
0
votes
1answer
78 views

Trying to move servo motor via 3 buttons

I am having some difficulties in trying to make my servo motor move to a specific angle based on the button pressed. For example, having the motor start at 0 degrees and then having it move to 180 ...
1
vote
0answers
153 views

Start / Stop Motor Run with Button State Change

I'm trying to understand Arduino with push buttons. But I can't get the test project I'm working on to work as how I want it to do. Basically what I'm trying to do with the codes below is to make ...
0
votes
1answer
69 views

I'm trying to control a servo with a push of a button but its not working HELP

I'm new to Arduino and I'm following this tutorial: https://www.youtube.com/watch?v=T2HMJiy9b_I but the problem is the servo just keeps moving back and forwards on it own and the button is doing ...
0
votes
1answer
25 views

Correct position for buttonState in my FSM

I wrote a FSM with the help of some tutorials through out the world wide web and so far it does what I want to do with it. But one thing that is not the way I want to be, is to exit the state ...
0
votes
2answers
134 views

Restart sequence of NeoPixel stick with a push button at any time

I am really happy with my new Arduino stuff and playing around with all those pixels :). I am new to programming and it's difficult to understand it, but with every success, I grow in knowledge. My ...
0
votes
1answer
157 views

read state from button to check if clicked

I"m kinda new here and new to the arduino framework. I want to build a "menu" using LCD 20*4, so I want to detect "button clicked" event. I've connected button to pin 8 and to ground, like this(...
3
votes
2answers
117 views

How to make an arduino button to forget his past purpose?

For my school project im making an arduino speedometer for a bicycle. I will be using a reed switch sensor to get the speed. There will also be an clock and a termometer, it will be on a 16x2 lcd ...

1
2 3 4 5
7