Questions tagged [button]

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

44 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
109 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 ...
2
votes
0answers
51 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. ...
2
votes
0answers
54 views

Arduino Uno - Stepper motor not working with button

I am completely new to Arduino, and all sorts of hardware and software. I have a stepper motor, which I want to rotate by a number of rotations when I press a button, and then go backwards by a number ...
2
votes
0answers
2k views

Stepper Motor button control with A4988 Driver

So I'm quite new to programming and have inevitably worked myself into a corner. What I am trying to accomplish is to allow for a stepper motor, (powered by an A4988 driver) to move with the push of a ...
2
votes
0answers
105 views

How can I call the variable **Servo::write** in Arduino for my 360 servo?

I'm trying to control a Servo with a push button and to help me watching if it is working I am using a LED but I'm not sure if I'm doing it well the Servo::write so I need you to tell me what am I ...
2
votes
0answers
119 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 ...
2
votes
0answers
43 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.
1
vote
0answers
33 views

DigitalWrite enabling external circuit only half ot the times

I'm a beginner making a simple arduino for a school project with an arduino uno. After the press of a button I activate, after a small delay, an external circuit obtained by disassembling another ...
1
vote
0answers
20 views

Let Servo rotate when file has been uploaded to webpage

I'm building an installation with a NODEMCU 1.0 where I want a servo motor (MG90S) to rotate when a file has been uploaded to a webpage. For my first step I have used this tutorial: Build an ESP8266 ...
1
vote
0answers
60 views

Arduino button voltage versus HIGH/LOW state

I'm measuring voltage between button's ground and input pole on the following sketch. When button is on off state, there's 5V there, when it's switched on and led turs on, there's 0. Is this a correct ...
1
vote
1answer
95 views

Making pushbutton behave as a toggle switch with ezButton - do I have to use ledstate with =! operator

I'm using ezbutton to make a pushbutton act like a toggle switch, first press doing permanent on, second press doing permanent off. I'm just trying to understand the basic coding. This project is just ...
1
vote
0answers
34 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 ...
1
vote
0answers
46 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 ...
1
vote
0answers
29 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
94 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 ...
1
vote
1answer
59 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 ...
1
vote
1answer
263 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 ...
1
vote
0answers
44 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 ...
1
vote
0answers
219 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 ...
1
vote
0answers
64 views

What is the best way to replace the buttons inside a car remote chip so that it can be controlled via Arduino?

I have a car remote that looks like the following I would like to replace the buttons with some sort of switch or relay that can be programmatically controlled via an arduino unit. Would a simple ...
1
vote
0answers
32 views

How do I have this audio and LED activate ONLY when a button is held using an Arduino?

I have this code that I am using to play a sound effect where I used a program called wav2c to convert a .wav file to number values that I put into a header file that I use in the code to generate the ...
1
vote
0answers
118 views

LCD on top of SD datalogger flickers help!

I have a problem with my 16,2 with buttons lcd shield.(LCD Keypad Shield). It is connected on top of an SD dataloger. I came to the conclusion that every time the sd shield logs data and completes the ...
1
vote
0answers
87 views

Communication using two HC05 modules

I'm working on a project that consists of sending data from flex sensors from a master Arduino to a slave arduino that uses that data to control servo-motors. I am trying to start slow and just ...
1
vote
0answers
35 views

How to stop and repeat a melody using a button?

How can we make our melody stop when we press the button the first time and repeat the melody when we press the button the second time? // Noterna defineras #define NOTE_B0 31 #define NOTE_C1 33 #...
1
vote
0answers
402 views

ESP8266 /ESP12F use flash button as input without using loop()

I couldn't find a proper answer anywhere on internet. I want to use the FLASH button as input in the setup() function and do not use the loop() with deepsleep mode (this part comes later). I tried ...
1
vote
0answers
1k views

Nested “switch” statements menu

I know that menus were discussed perhaps a thousand times here and everywhere. But using a ready solution is not something that I'm looking for because I know I won't learn the concept if I use them. ...
1
vote
1answer
382 views

Button state issue

Let me preface this by saying I'm a beginner, and I know my code must have some logic errors. I need some fresh eyes on this, I have been messing with it a few days and am just running in circles at ...
1
vote
0answers
93 views

Arduino: wrong digitalRead results from a pullup pin

A button connects GND to PIN where PIN is any digital pin. I want to catch the moment the button is pressed, so I wrote the following code: void setup () { pinMode (PIN, INPUT_PULLUP); Serial....
0
votes
0answers
30 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, ...
0
votes
0answers
63 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 ...
0
votes
0answers
61 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,...
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 ...
0
votes
1answer
482 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 ...
0
votes
0answers
58 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 ...
0
votes
0answers
677 views

Break a while loop with a push button (AccelStepper.h)

Disclaimer: This is my first Arduino project. Background: I am building a "rapunzel tower" lantern for my daughter: the witch pays a visit to Rapunzel meanwhile my daughter can read a book (or still ...
0
votes
0answers
63 views

Frequency Doesn't increase when Button Is Pressed

I’m trying to output a frequency that can be increased and decreased by using 2 buttons. I’m trying to first of all configure the first button (which increases the frequency). I’m trying to also add ...
0
votes
0answers
186 views

How to read resistive buttons with Arduino Pro Micro?

I am trying to read some resistive buttons presses on a PCB like this: This is the full sketch I am using: #include <Keyboard.h> byte ZbuttonPin = 3; void setup() { // initialize the ...
0
votes
0answers
87 views

my button won't work, why?

I have been trying to get the button to work properly for over a day, but it just won't, can you help me. The lcd display is for another part of this project, not important at the moment, but I can't ...
0
votes
0answers
59 views

Durable, thump resistant, buttons, at a cheap price

Not really an Arduino specific question, but I guess a lot of people on this board are also hobbyists, so they might have done something similar... For my project I need to connect buttons to the ...
0
votes
1answer
76 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
109 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
votes
2answers
98 views

Button Switch arduino

I'm trying to use my button as a switch (the led goes on after I push the button and the led goes off when I push the button again). I know I have the right circuit, because I also used a code from ...
-1
votes
1answer
262 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,...
-2
votes
1answer
982 views

Having issue with a redeclaration as a different kind of symbol

Been struggling with this for a few days and I suspect that i have several issues but I cannot find them. Project: Need a serial count that counts by 5-50 and a button interrupt should trigger a ...