export test

Dependencies:   SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217

Fork of Int_Demo_09May2017_Suhasini_HRavg_Nikita_ili9341 by nikita teggi

Revision:
22:ffa88619551d
Child:
31:37d3ae1fa1eb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/battery.cpp	Fri Jun 23 07:25:24 2017 +0000
@@ -0,0 +1,17 @@
+#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;
+} 
\ No newline at end of file