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
00001 #include "mbed.h" 00002 #include "battery.h" 00003 00004 AnalogIn A(PTB1); 00005 00006 float battery_voltage() { 00007 // GLC_PWR=1; 00008 // Enable=1;Shutdown=1; 00009 float b_voltage; 00010 //unsigned int samples1[4]; 00011 //unsigned int data2n; 00012 00013 b_voltage = A.read_u16()*(3.3/65535)*2; 00014 wait(0.001f); 00015 00016 return b_voltage; 00017 }
Generated on Wed Jul 13 2022 16:15:21 by 1.7.2