Hi,
I am trying to add the ability to get the battery voltage to the Tracker example. My intention is to add it to the radio payload so that I can monitor it at the ‘centre’.
To achieve this I have taken bits of the battery example and added them to my code.
At the moment I am just displaying the battery voltage in the serial monitor.
It initially appears to be working OK. Everything initialises and it starts the main loop - reads the accelerometer data and displays it; reads the voltage and displays it; reads the gps data and displays.
But it then just hangs.
If I comment out just the part that reads the voltage (below) it works normally.
// Get a raw ADC reading =======================================
// float vbat_mv = readVBAT();
Hi Carl,
My target is to include the battery voltage in the transmitted data.
I am just displaying it in the serial output as part of my testing.
Alan
BTW. I just noticed this:
Would I be better using this?
I’m new to the Arduino environment and I notice that the source files are .cpp rather than .ino.
Also that there several source files. Would I compile them separately? If so, how do I link them? Is there something I can read?