Modification into 17th July New display demo code
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of Ext_Demo_17July2017_newdis by
battery.cpp
- Committer:
- avp2417
- Date:
- 2017-07-23
- Revision:
- 34:8f6b0dc124e8
- Parent:
- 22:ffa88619551d
File content as of revision 34:8f6b0dc124e8:
#include "mbed.h" #include "battery.h" AnalogIn A(PTB1); float battery_voltage() { // GLC_PWR=1; // Enable=1;Shutdown=1; float b_voltage; //unsigned int samples1[4]; //unsigned int data2n; b_voltage = A.read_u16()*(3.3/65535)*2; wait(0.001f); return b_voltage; }