-
Notifications
You must be signed in to change notification settings - Fork 13.3k
system_get_vdd33 or ESP.getVcc() always 65535 #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Perhaps your TOUT pin is connected? |
I have install nodemcu (SDK 0.9.5) and send command maybe sdk problem |
Hello, I have ESP-07 module, where the TOUT is labeled as ADC pin. I don't have it connected, but I am as well reading 2^16. I have SDK 1.0.1 |
I tried esp-07 and esp-12 always return 65535. esp-07 and esp-12 nodemcu return 3614 or 3616 |
What include is required to get |
extern "C" { void setup() { } return serial monitor: ADC --> VCC return serial monitor: |
ADC has 0 – 1.0 V range, so don't connect it to VCC... |
I thought so TOUT = ADC (for ESP-07) i tried return VCC maybe. Sorry my english very bad. google translate :) |
@tontito I can see the definition is in that file., but adding Here is my program: extern "C" {
#include "user_interface.h"
}
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(analogRead(0));
Serial.println(system_get_vdd33());
delay(1000);
} And the output I get is:
|
Also if I manually define it by inserting the header line: uint16 system_get_vdd33(void); It compiles, but fails in linking with:
|
In your extern c declaration, add : uint16 readvdd33(void); And use that instead. It works fine here. On Thu, May 14, 2015, 11:05 Tim Caswell [email protected] wrote:
|
@chaduoming Thanks, but that's not working either. (Also didn't you mean If I put it in the extern block, the compiler complains it's not defined. If I put it outside, the linker complains:
|
@chadouming nice, how do I use your fork? Do I just dump it in the hardware folder of arduino? I also have local modifications to use esptool.py with custom |
nice job :) ESP.cpp and ESP.h Volt = ESP.getVdd33(); :)) very very nice. for me it's a beautiful day insert SpifFs file system work and readvdd33 work :) only one for me OTA (air update) :)))))) |
sorry two pull request. I don't know merge pull request. |
That should just replace the implementation of getVcc because it's the same
|
System_get_vdd33 just work differently, they added documentation in their appendix. |
This problema is related to this, because i have your same result |
Hi, |
Are you tried the Staging .json link ? |
Another one experiencing occasional watchdog resets when reading VDD. The call I am using is uint16 readvdd33(void); from "user_interface.h" |
The old way to read Vdd was completely wrong. ESP.getVcc() may be used to measure supply voltage. ESP needs to reconfigure the ADC at startup in order for this feature to be available. Add the following line to the top of your sketch to use getVcc: |
The problem is not solved with release 2.2.0 extern "C" { double get_vbat(){ always return 65,535 |
Hi, I solved the problem with version 2.2.0. I put it in separate file. ------------------------------- vbat.cpp ------------ ADC_MODE(ADC_VCC); double get_vbat() { }Reads between 3.04 and 3.06. |
@murix don't need user_interface.h.
|
Hi. ctx: sys
ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x4010f000, len 1264, room 16 I read on this link Stack was by readvdd33 and ESP.getVcc (), according @igrr but not in that place of my sketch I implement these commands to improve the stability of my ESP8266 or if in the end it really does not help me much. You know of any solution for this error? @igrr @murix @Testato @robertgregor @creationix @rumbero71 @ardyesp @chaeplin @ gordonendersby |
I made the change from the library IrRemoteESP8266.h and the problem has stopped. The new library works correctly with other libraries my project.Please excuse me |
@chaeplin I tested again, and work with #include "user_interface.h". |
@murix |
apparently it is generated by how some libraries are written |
system_get_vdd33 always return 65535.
void setup()
{
Serial.begin(115200);
Volt = system_get_vdd33();
}
The text was updated successfully, but these errors were encountered: