carrascoacd / ArduinoSIM800L

Arduino HTTP & FTP client for SIM800L/SIM800 boards to perform GET and POST requests to a JSON API as well as FTP uploads.
159 stars 58 forks source link

read battery voltage #22

Closed jaka87 closed 4 years ago

jaka87 commented 5 years ago

Hi there. Love the library. I noticed there is function to get the battery voltage but cant get it working.

char *batt;
batt=http.readVoltage(voltage);

gets me a void value not ignored as it ought to be how does one use it in order to get battery percentage ?

carrascoacd commented 5 years ago

Hi! Thanks

Try this:


char voltage[64];
http.readVoltage(voltage);