You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I just discovered in the new versions, the ADC ref/attenuation is messed up.
Connecting a 1.65 volt to ADC saturates the values to 4095.
If I decrease the voltage to below 1 Volt, it shows the values that if the reference was connected to a 1 Volt source. So for example a 0.5 Volt voltage has a reading of 2000/4095.
I tried to set the attenuation manually too but still doesn't work. Actually analogSetAttenuation() has no effect at all, even setting it to 0db doesn't make any difference in readings.
This code works perfectly on the stable libraries while it shows saturated values on Dev ones (2..0.0RC):
Hardware:
Board: node32
Core Installation version: 2.0.0RC
IDE name: Arduino IDE
Flash Frequency: 40Mhz
PSRAM enabled: ?no? ?yes?
Upload Speed: 115200
Computer OS: Windows 10
Description:
Describe your problem here
the ADC ref/attenuation is messed up.
Sketch:
//Change the code below by your sketchvoidsetup()
{
Serial.begin(115200);
Serial.println("HELLO!");
analogReadResolution(12);
analogSetAttenuation(ADC_11db);
}
voidloop()
{
Serial.println(analogRead(36));
delay(500);
}
Debug Messages:
HELLO
4095
4095
4095
The text was updated successfully, but these errors were encountered:
For the moment use: analogSetPinAttenuation(pin, ADC_11db) for each pin you intend to use with ADC, if you need the maximum input voltage range (about 2.55V).
Hello @saeedbala, sorry for late reply. Are you able to test your issue on development version 2.0.3-RC1 to check if this is still valid? You can take a look on Docs where is explained how to choose development release version in Arduino IDE.
as there was no answer in last 14 days, I'm closing the issue as expired to keep our backlog manageable. If it's still needed, please reopen the issue.
Hi! I just discovered in the new versions, the ADC ref/attenuation is messed up.
Connecting a 1.65 volt to ADC saturates the values to 4095.
If I decrease the voltage to below 1 Volt, it shows the values that if the reference was connected to a 1 Volt source. So for example a 0.5 Volt voltage has a reading of 2000/4095.
I tried to set the attenuation manually too but still doesn't work. Actually analogSetAttenuation() has no effect at all, even setting it to 0db doesn't make any difference in readings.
This code works perfectly on the stable libraries while it shows saturated values on Dev ones (2..0.0RC):
Hardware:
Board: node32
Core Installation version: 2.0.0RC
IDE name: Arduino IDE
Flash Frequency: 40Mhz
PSRAM enabled: ?no? ?yes?
Upload Speed: 115200
Computer OS: Windows 10
Description:
Describe your problem here
the ADC ref/attenuation is messed up.
Sketch:
Debug Messages:
The text was updated successfully, but these errors were encountered: