Questions tagged [input]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
80 views

Looking for a very simple board

I’ve worked with esp8266/esp32 boards in the past and they were great. But now I have a very simple project where both of these are way too powerful. I want to read one analog input over USB per COM. ...
  • 129
1 vote
1 answer
34 views

Input on the Nano RP2040 does not float

I am using the Nano RP2040 with MicroPython and run the following code: import machine import time p0 = machine.Pin(0, machine.Pin.IN) while True: print(p0.value()) time.sleep(0.3) The Nano ...
3 votes
1 answer
475 views

Input Oscillating Wildly

I'm trying to read an input from a switch but instead of getting 0 and 1 for closed/open, I'm getting 0 and a rapid series of 1s and 0s. Originally I tried (and failed) to simply read a rotary encoder ...
  • 39
0 votes
3 answers
81 views

Using 1 ms delay() in a for loop to check inputs.. Bad?

So first off, I know millis() exists. Just asking out of curiosity. Say you have a button you wanna check for during a delay.. Maybe a 10 second delay. So you make a for loop that checks for input and ...
2 votes
2 answers
36 views

How do I fix my code so that it reads text from the serial monitor?

I have created a code that should print out "Enter true to deactivate alarm" in the serial monitor, then store the user's answer and print "alarm off" if they enter true and "...
  • 21
-1 votes
1 answer
28 views

Serial.parseInt works for first menu but now in a sub menu

I am trying to use the Serial object to print some lines giving the users some options to select by entering an int. It works at this main menu. But when the user selects 1 I use Serial again to print ...
0 votes
1 answer
78 views

Drum game controller - Problem with Piezo inputs [closed]

I currently try to build some Drums for the game Clone Hero. The problem that I have is that I can't use both of my Piezo inputs that I have hooked up at the same time. I have a Arduino Pro Micro and ...
1 vote
2 answers
271 views

how to config the Arduino ADC'S input on A0 instead of use default?

I am try to build this AC-DC meter, the code original used default A3 as input, how can change the input on A0? the link: https://simple-circuit.com/arduino-autoranging-ac-dc-voltmeter-with-trms/ ...
  • 11
1 vote
0 answers
77 views

Serial communication problems

When I run this script serial communication just stops after a random period of time. There is no error it just stops outputting data and does not respond to inputs in IDE. Does anyone know a fix for ...
1 vote
0 answers
381 views

Writing multiple inputs to serial port using a while loop

I am trying to get the serial monitor to prompt me to input two settings - the PWM level and the Resonance level. I am being prompted to input the PWM level, but before I can input the Resonance level ...
0 votes
1 answer
160 views

What is happening when digitalWrite(pinname, LOW) is invoked after pinMode(pinname, INPUT_PULLUP)?

I read the Arduino official docs on digitalWrite and am confused about what is happening from an electrical perspective when digitalWrite is invoked on INPUT_PULLUP pins. Say my code says this: ...
  • 170
2 votes
1 answer
55 views

Arduino changing output based on wire voltage

I’m new to arduino and I want to build myself smart switch that can be turned of both manualy and via wifi, is there any way to change position of relay based on if another wire is live or not? Im ...
  • 315
4 votes
4 answers
2k views

Why am I receiving random input values in my Arduino?

I want to use a switch for my Arduino using digitalRead(), but I keep receiving random inputs. Whenever I connect energy to that pin, it always returns HIGH, but otherwise it goes completely random. I ...
3 votes
2 answers
347 views

Is it bad practice to multitask without timing constraints

Going through resources such as several things at the same time and with some greatly appreciated assistance on here I'm finally getting a grasp on how to multitask a microcontroller. Most examples ...
1 vote
1 answer
39 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
3 answers
71 views

Memory for inputs?

When a button is pressed, the Arduino might be busy with something (like drawing the screen). When the Arduino has finally time to check the button input, the uses might have release it already. Is ...
1 vote
1 answer
154 views

Arduino analog input to iphone notification

I need some help :) Is it even doable? Is there anyone who wants to help me program it? My wish: I want to receive a iphone notification when 1 arduino analog input drop from 5 to 0 volt. Then (...
  • 11
1 vote
2 answers
63 views

arduino mega buzzer output

I have project by Arduino mega which have 22 inputs and 22 outputs and buzzer reset and output reset pushbuttons , it have two status if the input is high(not continuous ) the output will on and the ...
0 votes
2 answers
87 views

Turn on relay for amount of time by continuous input

I have a project having two input status first the input is not continuous the output buzzer relay will be on for 10 seconds and then turned off or it can be off directly by push button the second ...
1 vote
0 answers
36 views

Changing the servo motor operating direction using arduino

I want to turn the servo motor 90 degrees with the first double high inputs, then I want to turn the motor 180 degrees with double high inputs, but the motor turns 180 degrees with one high input. ...
  • 51
1 vote
2 answers
476 views

Measure the time between 2 inputs

I am making a small project, and for that, I need to measure the time between 2 inputs. basically, a program to measure the time elapsed from when digital pin 2 is high to when it again becomes high.
  • 11
2 votes
2 answers
65 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 ...
0 votes
1 answer
134 views

Attiny85 Clone Cannot set P1 to input [closed]

Everything i read about the chinese Digispark attiny85 clones says you can use p0-5 as digitlal I\O (p5 as after fuse reset) Simple test code for a button will not let me use P1 as an input tied to a ...
2 votes
1 answer
94 views

Analog input voltage rises when motor is working

I'm making automatic water plant system. I'm using: Arduino Uno 3.3-6V water pump -https://www.amazon.com/Vipe-Micro-Submersible-Motor-Water/dp/B01N0X3CW4 Capacitive soil moisture sensor - https://www....
2 votes
2 answers
144 views

Plotting data from Arduino and using the serial monitor in parallel

I'm very new to the Arduino world so bare with me. I would like to plot live data that I receive from my arduino. I use the Serial Monitor to read user input, show text, etc. The only way I found to ...
2 votes
2 answers
814 views

Unable to use analog pins as digital inputs

I want to use the analog pin A7 as a digital input pin. As stated in the Arduino docs the analog pins can be configured in the same way like any other digital pin. However, when trying to configure an ...
  • 205
2 votes
1 answer
36 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 ...
  • 41
0 votes
1 answer
37 views

Streaming integer data from Arduino to Java, integer greater than 0xFF

I need to send how many milliseconds elapsed since the beginning of the time the arduino runs to java using Serial.write(). However, the largest integer that I can throw in there is 255, naturally ...
-1 votes
2 answers
47 views

Certain componenet does not seen to respond when given voltage

I am using a part off an electronics set I got a long time ago. It is off a electronic set called snap circuits rover deluxe Its a disc launcher and I have wired it to how it seems to want to be ...
5 votes
2 answers
582 views

Multiple Push buttons to one input

So I am trying to use one input to control an LCD display. The goal being that once one of the buttons is pressed it delivers a message. I have watched quite a few tutorials and can get the program to ...
3 votes
3 answers
2k views

How to wire a three-pin on-off-on switch for reading input?

I would like to read the output of an on-off-on switch with my Leonardo board, but I have very little knowledge of electronics and don't know how to wire it up. This is the switch in question: E-...
-1 votes
1 answer
34 views

Longruner Nano ATMega 328P input stays HIGH for 1s longer than the reality

I have a Longruner Nano ATMega 328P (copy of arduino nano, main difference being the USB connector, CH340 instead of the usual FT232, from what I could find using google searches). I wrote a super ...
  • 101
1 vote
1 answer
51 views

Is it possible to exit a loop on the change of an input state?

I would like to exit a particular loop if the state of an input changes from LOW to HIGH. This is the current loop: void brakeFade() { pixels.clear(); pixels.setBrightness(255); pixels.fill(16711680, ...
0 votes
1 answer
263 views

Using the LED pin for input

I have an Arduino-like device with few GPIO pins (DigiSpark clone). It is based on an 8-pin AtTiny85 IC so there are Power, Ground and six other pins, two of those six are being used for USB keyboard ...
1 vote
2 answers
30 views

Generate 5VDC signal when external sensor input changes from high to low

I am new to arduino. I have a project in which I need an arduino to generate a +5VDC signal in response to a change of status, (high/5VDC To low/ground) from an external source. The external ...
1 vote
1 answer
427 views

USB control panel with endless turn knobs

I understand that some arduinos are capable of presenting themselves as a USB HID device to a PC. I would like to use one to build a custom input controller that lets me read maybe 8 or so turn knobs ...
  • 173
0 votes
1 answer
196 views

How to code an arduino to execute a particular code using a slide switch

I’m pretty new to arduino. I need help concerning a project I’m making. I’m using a SPDT slide switch to switch between what code(method) should be executed.i.e when I shift the switch to the left, ...
  • 33
-1 votes
1 answer
58 views

Ultrasonic Sensor as Unlock Sensor

Is it possible to use ultrasonic sensors maybe HC SR04 type as unlock sensors? I'm figuring out if it can replace matrix keypad? For example 6 HC SR04 are used to be an input sensor waiting for a ...
  • 1
1 vote
1 answer
33 views

What is the name of a peripheral which reads servo output data physically?

I know the title is phrased terribly, but I'm not sure how to phrase it since I'm not sure of the name. I have a servo, that I cannot connect to, except for the output spine/shaft (physically). I ...
-1 votes
2 answers
109 views

Can't get actual output when, both input logic is high

I want When, light=0, ir=0 then output will pin 8 high & pin 12 low. light=0, ir=1 then output will pin 8 high & pin 12 high. light=1, ir=0 then output will pin 8 low & pin 12 low. light=...
-3 votes
4 answers
178 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
2 answers
669 views

How to read input pin on MCP23017?

I'm working to develop a simple code for MCP23017 that I want to use to run LCD128x64. I was succeeded to set IODIRB as output and blink LED as a test. Now I want to read the pin state, but I couldn'...
  • 283
1 vote
0 answers
410 views

Not Able to get INPUT_PULLUP pinmodes to work on multiple pins

I am working with an Arduino nano, and ic2 128x32 OLED display and a 1x4 membrane keypad. Problem is that only one of the 4 pins are detecting the button press. it's not the Arduino, I already was ...
0 votes
1 answer
49 views

Arduino Due Digital Inputs without Response

On two of my Arduino Due, when connecting the pin 3.3V to any digital inputs (37,36,35,34), no serial message nor LED_BUILTIN is thrown as output, only the Test message. Digital Pins are set as ...
0 votes
2 answers
119 views

Handling arduino output current

I need to power an actuator that requires 12 volts and consumes between 5 and 10 amperes depending on the weight it is charging. Therefore I bought a power supply of 12 volts and 10 amperes. My ...
1 vote
1 answer
2k views

Can I use the PWM pins as regular digital input/output pins?

In regards to the arduino which has pwm pins, can I use these pins as normal input/output digital pins or not? Thanks in advance.
1 vote
0 answers
28 views

Loop failure after unset amount of time

I am building an art piece that takes in input from three rotary encoders and two buttons. and outputs data to a large neopixel display and 2 large 4 digit seven segment displays. The displays are ...
1 vote
0 answers
48 views

Input value constantly

The code is for a DC motor position control PID system. I need the angle I need to move to "setpoint" and change it throughout the process. Though it is only changing once and then nothing happens if ...
  • 11
2 votes
2 answers
6k views

How can I tell the resistance of an internal pull-up resistor?

I have a SparkFun ESP8266 Thing Dev board, to which I want to perform a digitalRead() on one of the GPIO ports. I'm using D15, and I'm configuring it for input like this pinMode(15, INPUT_PULLUP); ...
  • 157
1 vote
1 answer
839 views

Can Arduino accept HDMI input video stream, and output it without any modification to the video?

I'd like to know please whether an Arduino can accept an HDMI signal from a satellite receiver, let it flow without any modification to the stream, and output it to TV?
  • 11