Skip to main content

Questions tagged [analogread]

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

39 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
199 views

Uno Ethernet shield and TMP36 reading

I am just getting started with my Uno via the Vilros Ultimate Starter Kit. I've done all of the sample circuits and played around with a few other things. Today I connected the Ethernet shield with ...
nlawalker's user avatar
  • 131
3 votes
0 answers
507 views

Accuracy reading two analog inputs on Arduino

I need a help with this question. I'm trying to make a Wheatstone Bridge with Arduino, the main idea is read the two legs of the circuit with two analog inputs of Arduino, for the while I'm analyzing ...
user avatar
3 votes
1 answer
8k views

error: 'analogRead' was not declared in this scope

I am using Codeblocks with arduino IDE to simulate the control of a stepper motor, and the errors "'analogRead' was not declared in this scope" and "'A0' was not declared in this scope" keep popping. ...
Arthur Fagundes's user avatar
2 votes
0 answers
68 views

Non-blocking analogRead for Arduino Nano 33 BLE sense

I need an alternative to analogRead() that doesn't block the processor. I've managed to find a lot of solutions for this for other boards, but not something that's compatible with nrf5240 like the one ...
Itay Pachelbel Jacob's user avatar
2 votes
0 answers
82 views

Reliably using analogRead as a compact digitalRead

My goal is to reduce pins being used for micro-controllers with limited pins, or projects requiring a few different digital input values. How I intend to do so is by using ADC pins to gather four ...
B7th's user avatar
  • 167
2 votes
0 answers
890 views

Measuring Amplitude/Frequency of sound

I need to read an analog signal at about 500-1000Hz for at least 5 seconds. I've a battery powered microphone wired into an analog and ground pin on my arduino and am trying to measure the frequency ...
zueses's user avatar
  • 21
2 votes
0 answers
144 views

Serial.println cuts off first digit

I'm trying to perform a simple analogRead() and print out the result, as below: void getVoltMeter() { readValue = analogRead(A2); readByte = readValue/4; Serial.println(readValue); Serial....
janizer's user avatar
  • 49
2 votes
0 answers
556 views

How to use Honeywell NBP Series Sensor with Arduino

I am trying to use a HONEYWELL NBPDANN100PAUNV Pressure Sensor. I found an example here http://www.circuitstoday.com/interfacing-pressure-sensor-arduino As this example says as instrumentation ...
ANKIT JAIN's user avatar
2 votes
0 answers
342 views

How to generate Analog Signal (Voice) to the microphone

I have question about microphone and generating sound signal. I have microphone in my intercom at home. It is simple analog microphone, not digital. What I want is to connect arduino analog ...
dugdthndwytn's user avatar
2 votes
0 answers
45 views

Bridge */arduino/analog/2 returns a blank page

Had some start up difficulties. But updated the YUN and IDE to the latest version. Using * "/arduino/digital/13/1" works as supposed (turns on the LED) - it's just a bit slow. But I can't see why ...
Norfeldt's user avatar
  • 121
2 votes
0 answers
949 views

ICP Accelometer Arduino

I need to connect piezoelectric accelerometer to Arduino. Precisely, it's this one: http://www.pcb.com/Products.aspx?m=352C34 Specs show that it generates 100 mV/g, but when I connected it between ...
Apez's user avatar
  • 21
1 vote
0 answers
218 views

ESP32 Shows Incorrect Input Voltage From Analog Pin

I have an esp32 WROOM-32 connected to a MQ9 gas sensor to GPIO35. Both are powered separately. measuring the output from the sensor directly using a multi-meter shows a constant reading of 0.145 V but ...
Kabilaash RB's user avatar
1 vote
0 answers
58 views

Code not checking for updated sensor values after connecting to firebase?

I am using a project with an MQ138 sensor and want to push the real time sensor reads to firebase. Currently, the wifi/firebase part and sensor part work fine separately. The code connects to wifi and ...
Rena W's user avatar
  • 11
1 vote
0 answers
352 views

Analog UV sensor displaying incorrect values in serial monitor (GUVA-S12SD)

Using Arduino Uno and a GUVA-S12SD sensor (https://www.adafruit.com/product/1918). Here's my circuit. 5V into sensor+, GND into sensor-, A0 to sensor out. Here's my code: void setup() { Serial....
Dan's user avatar
  • 11
1 vote
0 answers
213 views

I'm getting really unstable analog values with my B103348 joystick

I'm trying to make my B103348 joystick control a DC motor but I'm getting very unstable values from it specifically when the y axis is at 0. This is what my Serial monitor shows... 0, 21, 21, 21, 0, ...
Christian Bautch's user avatar
1 vote
0 answers
550 views

Pyfirmata util.Iterator causes serial communications issues with more than one Arduino

I'm using two Arduino Megas in a project to read data from a bunch of analog sensors and then output PWMs on digital pins according to their value. These analog signals are also being plotted on a ...
Han Zhang's user avatar
1 vote
0 answers
369 views

Problem with floating of AnalogRead

For a university Lab course i have to realize a UPS unit with a internal LiPo battery . The unit uses as battery charger a buck converter I have only a problem with the battery charger (buck converter)...
Marco Toni's user avatar
1 vote
0 answers
50 views

Math on analog read wrong result

I'm trying to execute a math of analog read but I get some weird result.. I searched about int and floats but didn't understand.. My code is : #include <SevSeg.h> SevSeg sevSeg; int bitsChange ...
m sayed's user avatar
  • 11
1 vote
0 answers
70 views

ESP32 reading analog 2.4Ghz

Is there a possibility to analog read on the 2.4Ghz band to just read how much activity is in the presence of your device? Not parsing the messages but just listening to how strong of a signal you are ...
Roel's user avatar
  • 49
1 vote
0 answers
63 views

Phantom reading

my project is to control led diode and dc motor, test shield buttons, and check system run time. Testing buttons and run time i have done. Deal is with led and dc motor control. I'm getting phantom ...
Jānis's user avatar
  • 59
1 vote
0 answers
40 views

Connect k-type termocouple using o-amp

first of all I have to say that this is my first Arduino thing. I'm trying to connect a k-type termocouple to my Arduino using an LM2904 Oamp, Yes I know that this is not the best solution but is the ...
efirvida's user avatar
  • 111
1 vote
0 answers
223 views

How to calibrate Arduino DUE analog readings?

I am having a problem with the analog readings on my Due. On pin A4 and A5 I am measuring voltages: double vcc = 3.288 // taken on pin 75 (ADVREF) ; analogReadResolution(12); result = analogRead(A4) ...
Jack's user avatar
  • 213
1 vote
0 answers
3k views

Using ESP32 to measure vbat

I'm using ESP32 to read an analog value of a liPo battery (3.7v-4.2v). Since ESP32 DAC's is 3.3v I'm using a voltage divider ( 2x10K resistors ), to split bat's voltage into ESP's GPIO36. So far ...
guyd's user avatar
  • 1,049
1 vote
0 answers
152 views

Need help in the problem with analog input readings and RTC DS3231

I have 3 analog input(0-1024). I want two outputs based on levels of analog inputs. Eg. inputs have 2 levels. for A0 at 300,digital output pin3 turns ON; and A0 at 500, digital output pin 4 turns ON. ...
Varun Patel's user avatar
1 vote
0 answers
285 views

Temperature varations using ADS1115 and voltage divider to read 12v

I have an issue with reading battery voltages of three 12 volt batteries using an ESP-01 and an ADS1115. I have been graphing the measurements and the all of the graphs have a temperature component ...
rockfishon's user avatar
1 vote
0 answers
49 views

Strange cyclic errors in analogRead on Nano

I am trying to build an emergency shutdown of a gas valve based on the output of a smoke detector. It basically measures the voltage on the buzzer of the smoke detector, and if high enough, changes ...
til's user avatar
  • 11
1 vote
0 answers
80 views

Differing behaviour from Arduino Nano when plugged into laptop vs power source

Well here's a weird one. I'm monitoring a mic on an analog pin of an Arduino Nano and using the variation in voltage to control and LED. When plugged in to my Laptop (USB 3, 500ma available, the ...
brianfit's user avatar
  • 183
1 vote
0 answers
60 views

Analog Read gives Erratic behaviour in Struct

I'm getting some very strange behaviour from a Haptic feedback system I'm trying to make. The test code works fine as a Multiple-In One-Out in the main loop, but once I moved the code to the Struct, I ...
Minothor's user avatar
  • 111
1 vote
1 answer
200 views

Can I hook up an Analog multiplexer to Arduino Nano?

I want to increase the analogue inputs for the Nano. So is it possible to hook up a CD74HC4067 analog multiplexer to it? Thanks.
enoob's user avatar
  • 51
0 votes
0 answers
34 views

AD8232 Sensor output problem

I'm using the AD8232 ECG sensor with Adafruit ESP32 Feather V2. I'm following this Sparkfun guide https://learn.sparkfun.com/tutorials/ad8232-heart-rate-monitor-hookup-guide/all to use the sensor ...
GiaNguyen Pham's user avatar
0 votes
0 answers
158 views

How to work with a pulled high input pin where it needs to read a value from an analog sensor?

I have a small ESP32 module, that has some in-built features, like a TFT, and has few available pins for general use. It has some input only pins (GPIO36 to 39) that are used by buttons soldered in ...
Rodrigo's user avatar
  • 113
0 votes
0 answers
59 views

Does anybodyknow how to program Muscle Sensors v3?

#include <Servo.h> const int x = 200 //Naming the servosServo Servo servo1; Servo servo2; Servo servo3; Servo servo4; Servo servo5; Servo servo6; void setup() { Serial.begin(9600); ...
Jordi Munoz Ortiz's user avatar
0 votes
0 answers
362 views

eps32 bad adc even with external adc (ADS1115)

Im trying to read an analog value with my esp32 and send it over wifi to another esp32. The wifi part works flawless, however when i try to read an analog value form the esp32 its not useable. It ...
Felix T.'s user avatar
0 votes
0 answers
373 views

Can HC-05 Continuously Stream data and read data at the same time?

I am trying to have my Arduino Stream an Analog Signal using Bluetooth Module (HC-05) while being able to read commands from another Micro-controller using the same Bluetooth Module. Currently, I am ...
Julius's user avatar
  • 91
-1 votes
1 answer
152 views

Playing Audio from SD - Get VU, or audio waveform

I am using the library SimpleSDAudio to play a song from my SD card to an op-amp later in the circuit. I would like to take a sample from the audio pin (possibly with a Analog read) to power some ...
Linuxx's user avatar
  • 99
-1 votes
1 answer
335 views

Using case statement with IR emitter reciever

I am trying to use two "infrared obstacle avoidance modules" to work with the following sketch. From all my research, I believe, a case statement is my best option because, (I understand) the sketch ...
Bender's user avatar
  • 61
-1 votes
1 answer
560 views

AC Voltage Sensing using Arduino Uno

Is it possible to sense AC Voltage using analog input for Arduino Uno or can it only read DC? I mean I've tried connecting an AC voltage source to analog and I'm reading some numbers. However, I don'...
ARJ's user avatar
  • 1
-1 votes
1 answer
164 views

External ADC reference when using MATLAB support package for Arduino

I am using the MATLAB support package for Arduino. However, I need to configure the ADC reference to external. MATLAB documentation doesn't really explain how to do this? Is there any way I can use ...
Dr Krishnakumar Gopalakrishnan's user avatar
-2 votes
1 answer
184 views

600VDC measurement with Arduino (voltage divider)

I need to detect quick (~200ms) voltage drop, so I am thinking of making an oscilloscope with Arduino. Problem is - can I reliably read 600V DC voltage and what resistor values should I choose for ...
Ri Di's user avatar
  • 97