Questions tagged [button]

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

Filter by
Sorted by
Tagged with
2
votes
2answers
74 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 ...
0
votes
0answers
32 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 ...
-2
votes
1answer
35 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 ...
-1
votes
1answer
41 views

How can I make my Arduino Esplora program start on the press of a button and then continue to run without me having to hold the button down? [closed]

I am trying to create a program where the main code starts on the press of a button. I am using an Arduino Esplora, and I want to have the built-in LED be blue when I plug in the power until I press ...
0
votes
2answers
35 views

Displaying when Button has been pressed for LED and returning 1

I've just started using Arduino and I'm having trouble getting my code right. Here is the task I need to do. "Create a button read function Hint: the function header should be int checkbutton ( ...
-1
votes
0answers
53 views

Need a Arduino code “BlinkWithoutDelay”

const int buttonPin7 = 7; const int buttonpin2=2; const unsigned long onTime = 5000; unsigned long previousMillis = 0; int led=13; void setup() { pinMode(led,OUTPUT); Serial.begin(9600); ...
0
votes
2answers
77 views

Substitute multiple potentiometers for push buttons and single potentiometers

this is my first post here. For some time I have been struggling with a problem and would like to know if anyone has a solution to share. I am building a 4 tone sequencer, where I use 4 ...
-3
votes
4answers
120 views

How should I connect 5 buttons to arduino so that I can use the least number of inputs all the buttons are connected to ground

The problem here is that I want to connect 5 input buttons to an Arduino but I do not want to utilize 5 input pins of Arduino, is there any matrix like connection using which I can reduce the number ...
0
votes
0answers
52 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 ...
0
votes
2answers
41 views

NeoMatrix Button Troubles

I am creating a 20x15 LED Matrix using and Arduino Nano. My goal is to switch between different "scenes," if you will, using 4 buttons (I just need to run different code to make it display something ...
0
votes
2answers
76 views

Press On Hold Off Power Switch

Hi everyone I am hoping someone here can help me. I am trying to make an arduino turn my project on and off.Using a relay. I am looking for it to act like a computer power button. A short press to ...
0
votes
1answer
78 views

How to detect button presses with a 74HC595 shift register?

Is there a way I can have my arduino uno differentiate between pushbuttons that are wired through a shift register and detect when each are pressed or not? I found this tutorial for the 74HC165 but I'...
1
vote
1answer
23 views

How to (optimally) fetch a button press? [duplicate]

For my hardware, I need to check if the button was pressed, but I need to do things only once every half a second. if (digitalRead(pin) == HIGH) { doStuff(); delay(500); } The above does ...
-1
votes
1answer
36 views

light leds from an array

I have the project to build a robot for my school. It will record button pushes then move according to this record. Before usig motors, i'm trying to do this using leds. Thanks from posts from this ...
0
votes
1answer
39 views

Servomotor AND Button

I am having trouble trying to make servomotor and button work together. The button code here below works fine when alone in a separate code but when it is transferred to the code with the servomotor ...
0
votes
2answers
48 views

Only print when the button is pressed and not being pressed anymore

I have an Arduino and a microswitch that I want to use to know when the switch is initially being pressed (get "OnsetTime" on Serial) and when the switch is not being pressed anymore (get "OffsetTime" ...
0
votes
2answers
70 views

Button circuit draws all power away from LEDs

I'm very new to Arduino, so please forgive me if I don't know the proper terms for things. Whenever I press the button on the board, the LEDs all shut off. I can't host the image files on imgur, and ...
0
votes
0answers
38 views

How to merge temperature sensor DHT22, RTC DS3231 and button [duplicate]

I am currently working on the fan function, which would be able to switch every minute for 10 seconds with RTC DS3231, at the same time I would like to incorporate a temperature sensor DHT22 and ...
0
votes
2answers
266 views

How Can I convert my arduino code to C/C++ embedded code [closed]

For example I have an code for arduino but I want to change it to embedded C to create more professional project with different hardware. is there any tutorial? I know the logic and the most of the ...
-1
votes
1answer
58 views

4:1: error: expected initializer before 'void' [closed]

int button void setup() { pinMode(13, OUTPUT); pinMode(12, OUTPUT); button 4; pinMode(4=INPUT); } void loop() { if(digitalRead(4)== LOW); { digitalWrite (13, HIGH); delay (250); ...
0
votes
1answer
66 views

How to connect Big Dome Button with arduino

I am quite new to arduino and for a project I want to use big dome button which when pressed it will count how many times has been pressed.It is using 12 volts.The button is this https://www.sparkfun....
0
votes
1answer
129 views

DS3231 + button to trigger light

please can someone help me with code, i want to have automatic trigger on specific hour, also i want to have button switch if needed, in my code i can press the button to trigger light relay, but my ...
0
votes
1answer
35 views

I am trying to combine a button's coding and servo's coding. But it is still cannot be verified. What have I done wrong? [duplicate]

include Servo myservo; void setup(){ myservo.attach(8); pinMode(buttonPin, INPUT); } void loop() { myservo.write(0); delay(3); myservo.write(90); delay(3); } const int inPin=8; ...
0
votes
4answers
428 views

Detecting how many button presses(single tap, double tap etc) with two simultaneous buttons

noob here So what I am trying to do is output a different number depending on the number of button presses e.g. for 1 button press it should output 1 and so forth. After that I only really want the ...
0
votes
1answer
170 views

Multiple buttons to control relays

Dears, I have a problem that I could not solve for a while, I tried the code below but it did not work. There will be 4 buttons controlling 4 relays but in a way that button one will turn relays 1&...
0
votes
1answer
117 views

Menus not changing when button is pressed TFT 128 x 128

I've just followed a tutorial so that when a button is pressed it goes through a menu. Click once, next slide. Only issue is it isn't appearing on my screen at all. It has uploaded but I'm a total ...
0
votes
2answers
32 views

Push Button to Drive Power to Servo

I am currently doing a project for a class which uses a few other components such as an LCD, a servo, and such. I want to use a button which acts as a circuit breaker on the Vin of the servo in which ...
0
votes
1answer
49 views

How to add indicator lights to button sketch

I would like to add leds to each button switch in the first code, The first code sends midi messages to a DAW I would like it to also turn on a led as an indicator light. The switch needs to turn the ...
0
votes
0answers
34 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
1answer
19 views

Wiring power new power button to UPS power module for raspberry pi [closed]

I have a UPS Power Module Expansion Board for Raspberry Pi 3B/3B+(Plus) and removed the power button because it is in the way and would like to attach this read button instead. But it is not working, ...
0
votes
1answer
136 views

2 buttons pressed at the same time elevator logic

I have currently created a working elevator code where the elevator goes up when pressed a button, and stops at a floor when the sensor senses that it has reached the floor. This is how it works: #...
2
votes
1answer
143 views

Run light sequence function continuously in if statement

My goal - run light sequence function on momentary button press (button 2) continuously until another of the 3 momentary buttons are pressed. /* switch * * Each time the input pin goes ...
0
votes
2answers
133 views

control 3 relays with 1 button

Is there a way to control 3 relays with 1 button? My idea is: There are 3 modes; mode 1 for relay 1, mode 2 for relay 2 and mode 3 for relay 3. With a long press you switch between modes (After 3 ...
0
votes
2answers
233 views

how to interrupt the loop function and restart it?

I have a project with some NeoPixels and other LEDs and an Arduino UNO. Once switched on, the defaultLEDAnimation with colors and blinking, etc. starts. I want to trigger some other animations, so I ...
-1
votes
1answer
88 views

Trying to light an LED with one Button and have no idea what is wrong

New to Arduino. I am trying to use a single button to light and turn off a single LED. I followed an online tutorial (youtube video) and changed the code just a bit. I know it is for two LEDs but I ...
1
vote
0answers
35 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 ...
1
vote
1answer
159 views

How can I use a transistor to “press” a button?

I have a heater remote that I want to press the buttons of with my Arduino. I am powering both the remote and Arduino from an external 5V source so both grounds are connected. Currently I have tried ...
0
votes
2answers
63 views

How to run 3 mode of operation for each operation has individual push button to select the mode in Arduino?

I need to run 3 modes of operation if 3 push buttons are pushed in arduino. I have made the initiate code logic for one push button and one operation but I got an error message of "redefinition of int ...
0
votes
0answers
25 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 ...
0
votes
2answers
794 views

Debouncing a button with interrupt

I tried to follow the answer here: https://arduino.stackexchange.com/a/18545/51302 Unfortunately I can only get the interrupt to go once (on serial monitor is the time of that first interrupt), then ...
2
votes
1answer
367 views

Arduino Timer with increase time button

I have an Arduino project to do, which requires a countdown timer(which I've already done). I connected a push button, and when I press that button I need it to increase my countdown timer by +10 ...
0
votes
0answers
65 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
1answer
118 views

Garage door button with delay feature

I am working on an art project that involves a garage door opener. I am very new to Arduino, and electronics. I have a starter kit with a ton of accessories. The garage door opener has 2 screws (...
-1
votes
1answer
41 views

One Led and 2 buttons [closed]

I need to switch on led with pushing button number 1 , and during 3 seconds it should stay on, and if I push button number 2 during this 3 seconds led should turn off. In other case after 3 seconds ...
0
votes
0answers
62 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 ...
2
votes
2answers
64 views

RGB LED Mode toggle - Trying to avoid using main loop()

I'd like to start by saying that I have only been dabbling in electronics (not just Arduino) for about 3 days now. I am trying to write a sketch which changes an RGB LED when a push switch is pressed....
0
votes
1answer
45 views

Can a Arduino Uno handle all these components?

Its my first project with an Arduino, so please bear with the dumb questions. For this project of mine, I need an Ultrasonic Sensor, a Gyroscope, a Buzzer, three push buttons and an 16x2 LCD. Can ...
0
votes
0answers
13 views

How to wire an lcd and a button [duplicate]

Anyone know how to wire a lcd with a button to react when the button is pressed and print on the lcd
-1
votes
1answer
43 views

Code and wire a LCD and button [closed]

I need to code and wire: “Button is pressed.” to an LCD screen when a button is pressed. When the button is released, the LCD should display, “Button is released.” NEED HELP!!!
1
vote
1answer
30 views

Press one button then another?

Let's say we have two buttons - button 1 and button 2. What I need to do is to do something (like turn LED on) when button 1 is press, then button 2 is pressed. I can do it realy simple by just using ...

1
2 3 4 5 6