Questions tagged [digital-in]

36 questions
5
votes
1 answer

ArduinoMEGA: 64 digital inputs cause random digitalRead values

I have 64 hall effect sensors (magnetic field sensors) (DRV5023AJQLPG) connected to an Arduino MEGA 2560. For that, I use 48 digital pins and 16 analog pins as digital input pins. The program in the Arduino continuously reads out those 64 digital…
Edo Paulus
  • 88
  • 1
  • 8
5
votes
1 answer

How to confirm a pin is fried

How do you confirm a pin has been damaged and is unable to work as a digital input? I tried detecting a pushbutton (connecting ground to pin 11 with a pullup resistor enabled) on a fresh Arduino Uno and digitalRead() always registers 0, regardless…
Cerin
  • 1,688
  • 2
  • 28
  • 45
3
votes
1 answer

Digital I/O threshold voltages for ATmega32u4

What are the voltages on a ATmega32u4 (eg Arduino Leonardo) such that a HIGH or LOW is read? I want to ensure that I'm reading the chip reference manual correctly, where Table 29-1 says: VIL: Input Low Voltage, Except XTAL1 and Reset pin Min:…
Tom Hale
  • 431
  • 6
  • 19
3
votes
3 answers

At what frequency/rate does the digitalRead function read an input?

Consider the following code: void loop() { // read the state of the pushbutton value: buttonState = digitalRead(buttonPin); // check if the pushbutton is pressed. // if it is, the buttonState is HIGH: if (buttonState == HIGH) { //…
user16307
  • 237
  • 2
  • 4
  • 15
2
votes
2 answers

Mixing analog reads with raw port reads

I'm reading two digital inputs and one analog input. For [reasons] I must use A0 and A1 as digital ins, and A2 as an analog in. I'm uncertain about how the Arduino hardware deals with mixing analog and digital inputs on the same port. For speed, I'm…
Jim Mack
  • 269
  • 6
  • 14
2
votes
2 answers

Arduino read PWM duty cycle value with input (analog / digital)

I am working on comparing autopilots like Ardupilot, CC3D, KK2.1.5. The comparision is about system reactions/behaviors that it gives during flight. For this purpose, I need to read the PWM duty cycle (like osilascopes - the PWM frequency can be…
acs
  • 235
  • 5
  • 16
2
votes
2 answers

Arduino - Turn on LED when Potentionmeter is used

I'm very new to the Arduino/Microcontroller-world, so please be patient :) I have 4 potentiometers and I want my LED to blink up, when one of these is beeing used. So far., so good.. the potentiometers are sending singnals to my inputs A0-A3. In the…
crunchy
  • 31
  • 2
2
votes
2 answers

Are there any Analog pins on the mega that can not be used as Digital?

I am using both Arduino nano and Arduino mega boards in my projects. I got a nasty surprise the other day when I learned that, on the nano, Analog pins 6 and 7 can not be used as digital pins. Are there any Analog pins on the mega that can not be…
Hoytman
  • 747
  • 5
  • 13
  • 27
1
vote
1 answer

Fast digital IO

I have a device programmable via an 8 bit digital parallel bus. I would like an Arduino to translate from a parallel 4 bit output of an existing device to 8 bit by intentionally reducing the resuloution. Unfortunately, I can't just use the most…
P. Egli
  • 121
  • 3
1
vote
2 answers

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 buzzer will be on, if output reset pushbutton is…
eng.hamza
  • 29
  • 4
1
vote
3 answers

How long does my digital pulse need to be for it to be read?

I have the following really simple code. On every iteration it'll read the first pin, and if it's high - do some serial IO. Then do the same with the second pin. Nice and simple, works during my tests. My concern is that (in production), the digital…
1
vote
0 answers

Digital input on one pin is copied to other pins

I am working on a phase detection project in which i am trying to find the order in which the incoming signal comes. I converted the 240v 50hz Ac signal to a 7v 50hz square pulse. when i connect one(7v 50hz) of the three lines to a digital pin on…
1
vote
0 answers

Correct wiring?

I'm doing some Home automation and am currently trying to automate my intercom system. My overall aim is to be able to detect when someone has pressed the buzzer and then to be able to open the door if I so wish. Below is the diagram of what I…
Rocco
  • 165
  • 5
1
vote
2 answers

How to set sampling rate for digital pin input?

I have an ADC that have sampling rate up to 40 MSPS, but i use 8 MHz clock so it will be 8 MSPS. The board used is arduino nano. The problem is i have to sampling it just 2 MHz (because the capacity of array variable in arduino Nano, which is around…
Zahi Azmi
  • 139
  • 1
  • 9
1
vote
2 answers

Reading input from digital pins 36, 37, 38 in Arduino Mega 2560 is giving a problem

I wrote a program to read digital input from pins 36, 37, 38 and print on LCD when they go HIGH. I've connected those pins to a switch to test. The program looks like this: #include "LiquidCrystal.h" // initialize the library by providing the nuber…
Aparna B
  • 113
  • 4
1
2 3