Questions tagged [analogread]

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

38 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
1answer
2k views

Update Dynamically Tkinter Widget Scale from Arduino Ports using python and firmata

I'm having trouble trying to get Arduino digital ports values and set these values into a Python Tkinter Widget Scale. I'm using Python and Arduino with Firmata. I'm able to access my arduino board ...
2
votes
0answers
43 views

Reliably using analogRead 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 ...
2
votes
0answers
436 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 ...
2
votes
0answers
108 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....
2
votes
0answers
430 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 ...
2
votes
0answers
175 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 ...
2
votes
0answers
465 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 ...
2
votes
1answer
5k 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. ...
1
vote
0answers
53 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 ...
1
vote
1answer
63 views

Why does the LEDs affect Analog Input?

So I'm working for a project to control RGB Led Strip using microphone or sound sensor with Arduino Nano. I'm using 5050 RGB Led Strip around 120 LEDs, and I control them using simple transistor ...
1
vote
0answers
709 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 ...
1
vote
0answers
774 views

avrdude Programmer is not responding Mac

I'm VERY new to Arduino programs. I'm trying to upload the AnalogInOutSerial example to my Arduino, however, I keep getting an error saying that there is a problem uploading to the board. Thank you ...
1
vote
0answers
48 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 ...
1
vote
0answers
321 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 ...
1
vote
0answers
41 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 ...
1
vote
0answers
747 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 ...
1
vote
0answers
994 views

Get a internal temperatura form ATMega328

I am making a circuit which takes three kinds of monitor temperature of the chip itself, in this case ATMega328 at room temperature, which is influenced by external thinks such as lasers, which will ...
0
votes
0answers
31 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 ...
0
votes
0answers
50 views

how to write freerun analog samples to a file on MacOS

I've only just managed to get the Arduino IDE on MacOS set up with my ESP8266 board. My loop is running and I can see the lovely serial output in the Serial Monitor window in the Arduino IDE. I'm ...
0
votes
0answers
27 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) ...
0
votes
0answers
37 views

Why does setting a digital pin to INPUT make one of my analogue pins into a digital input

I have connected four sensors to four of the analogue inputs and I can read the values they return just fine, it all works. However, I also need a digital input and when I set the mode of one of the ...
0
votes
0answers
38 views

Problem with Reading Multiple Analog Values From ESP8266 NodeMCU

I am using ESP8266 nodemcu with ADS1115, but values are totally wrong. Why this happened? Is there any solution to extends the Node MCU 8266 pins with accurate sensor values ?
0
votes
0answers
80 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. ...
0
votes
0answers
93 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 ...
0
votes
0answers
35 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 ...
0
votes
0answers
119 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 ...
0
votes
1answer
402 views

Analog output gives a close range of values

I try to get a good range of values from VMA309 sound sensor. However, when I connect it properly it gives me a range of values +/-5 like below. The documentation says it should give numbers ...
0
votes
1answer
156 views

Cannot get esp8266 - 12 wifi module to always read analogRead incoming voltage accurately

So I have and arduino uno that is firing an output on pin 8. This code is not in this file just to be clear. From there Im taking that output and using it to fire pin 0 on the wifi module. Im using ...
0
votes
0answers
46 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 ...
0
votes
0answers
456 views

Arduino reading its own voltage wrong

I have made a PCB where I am using atmega328p (Arduino IC) to read some voltages. I have written its code in arduino software. I am giving voltage first to a voltage divider circuit and then to the A0....
0
votes
2answers
356 views

Regarding PGA bypass in ADS1262

I want to bypass the PGA to change the input signal range from +/-2.5 to 0/5 V range. I have taken the reference of example given in this library. I have interfaced protocentral-ads1262-32-bit-...
0
votes
0answers
46 views

Arduino Robot motors disabled when AnalogInput is connected

I have attached a solar panel to the Arduino Robot, connecting the - to the TK3 Input GND, and the + to the TK3 Input Analog Pin. I want to turn the robot around and "scan" the voltage. But the motors ...
0
votes
1answer
134 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.
-1
votes
2answers
62 views

Why am I getting erratic Analog.read() readings?

Im trying to make an arduino controlled PWM fan using a potentiometer. Ive connected the circuit as in the diagram below (The transistor is a TIP120 if it's hard to read): Here is my code: int fan = ...
-1
votes
1answer
92 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 ...
-1
votes
1answer
142 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'...
-1
votes
2answers
166 views

Arduino analogRead fluctuates from sensor unless USB connected

I have an Arduino connected to a 4-20 mA sensor through a current to voltage converter. When connected to the power supply the sensor reading fluctuates, as soon as I also connect it to a USB port it ...
-1
votes
1answer
140 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 ...