We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [analogread]

A standard Arduino function for detecting the voltage on an analog pin via ADC.

Filter by
Sorted by
Tagged with
5
votes
4answers
20k views

How to add hysteresis to threshold values?

This code compares the analog input value against two thresholds, having three voltage regions. Then it will turn on an LED according to what region the read voltage is in. The problem is that when ...
0
votes
1answer
180 views

How to interpret analog values sent to Arduino from line scanner?

So I have a line scan camera attached to my Arduino Mega and I'm trying to send it a digital clock impulse and get an analog output back. The line scan camera is supposed to return 128 pixels. So far ...
5
votes
4answers
13k views

Can I connect a PWM pin on one Arduino to an analog input on another?

I was considering several different ways to send simple data from one Arduino to another when I though, why not connect a PWN pin of one Arduino to the analog pin on another? I could send simple ...
4
votes
2answers
4k views

How to increment and decrement an output voltage by using two buttons?

I'm trying to create a code using an Arduino Uno board to increment and decrement the output voltage of the Arduino Uno which is 5 volts and I need to step it up to 10 volts which I have done below. ...
1
vote
1answer
277 views

Read an analog signal without changing it? Or should I start over?

Hi! I'm still working on my kettle project. I want to obtain the kettle temp from the existing thermometer. I'm able to do this, but much like trying to look at an electron my circuits all reduce the ...
1
vote
1answer
868 views

Analog inputs showing value even there is nothing connected to it [duplicate]

After watching something weird on the serial monitor I wrote a simple code to monitor the analog pin input values. There was nothing connected to the analog pins still they where showing decimal ...
0
votes
1answer
2k views

4 channel relay module reversed? Or is it my code?

So I am designing a simple project where my Arduino reads analog values from a potentiometer, or rotation sensor, as it is called on EBay, and uses that value to determine how many relays to close. I ...
5
votes
3answers
19k views

Sending a value from one arduino to another

I wonder if it is possible to send a value from one arduino to another. Basically, I have one arduino measuring let's say weight, but I want to display that value using an lcd in another arduino. ...
2
votes
2answers
18k views

Arduino: Read frequency of input from audio jack

I want to trigger an arduino from a sound from an audio jack from a mobile phone. The audio is a 1 Khz sound that the mobile will play. I want to avoid accidental triggering of the audio by testing ...
1
vote
1answer
2k views

Arduino Cross Correlation?

How can I write lightweight cross correlation code for arduino? I couldnt find any solution. The measurement system contains an ultrasonic sensor and a servo that turns from 45 to 135 degree and ...
1
vote
2answers
2k views

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 ...
0
votes
1answer
643 views

Arduino Due: ADC gain adjustment problem

I want to increase gain of the ADC channel. To achieve this I'm using adc_set_channel_input_gain function from adc.h. Here is the entire sketch: const byte aPin = A6; void setup() { ...
5
votes
2answers
5k views

A question about resistance measurement with arduino

Lately I was asking myself about the possibility of measuring a potentiometer resistance with Arduino. My questions are: Is it possible? If it's possible, what kind of restriction does the Arduino ...
3
votes
2answers
8k views

Reading many analog signals in arduino

I need to measure around 50 - 100 analog sensors (resistors). This poses two challenges: Arduino has fewer analog pins. I'm targeting something small like arduino Mini or Nano, which can have up to 8 ...
2
votes
4answers
7k views

what is arduino adc reference?

I'm using arduino for the first time and don't really understand what am I suppose to plug to the ADC refernce PIN... or if I even have to use it while plugging analog sensor to the arduino, thanks!
2
votes
2answers
645 views

Arduino audio frequency reader

I have a simple project for my arduino : light some leds when i send a certain frequency from my smartphone through the jack output . For example , I play a simple audio file generated with a ...
1
vote
3answers
828 views

Analog input draws current when Arduino is turned off

I am using a Arduino Pro Micro from SparkFun (similar to Arduino Leonardo, cpu: Atmega 32u4). It has a analog input: A0, which I use to keep track of the battery voltage in my battery powered project (...
1
vote
2answers
1k views

AnalogRead(0) always returns 0 on RFduino

I'm using RFduino to do analogRead at pin 2 and pin 0. Pin 2 works perfectly, and I got the result. However, for pin 0 it returns all zero. #include <RFduinoBLE.h> static const int topPin = 2; ...
1
vote
3answers
1k views

How to Store 2 analogRead values and read using EEPROM for Arduino Uno?

Trying to write 2 values coming from analogread(A0) and analogread(A1) by EEPROM.write and retrieve the values by EEPROM.read. I tried the following sketch for each write and read. However, could not ...
1
vote
2answers
806 views

XL335B accelerometer reports false readings

I'm using an XL335B accelerometer in a GY-61 breakout board. I'm powering the device using the UNO's built-in 3.3V power supply. The following code should convert the readings to m/s² (SI); however, ...
0
votes
2answers
2k views

Reading a photoresistor

I have a wire with a 0-5v current. I want to detect if the current is there or not (HIGH/LOW.) I'm using an optocoupler to avoid putting too much current into my micro, as it is only a 3.3V micro. I'...