Battery

Dependencies:   mbed PowerControl SDFileSystem

Fork of HeptaBattery by 智也 大野

Committer:
tomoya123
Date:
Tue Dec 13 06:37:27 2016 +0000
Revision:
1:166ddf929155
Parent:
0:d53e9c6fc771
HeptaBattery

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tomoya123 0:d53e9c6fc771 1 #include"mbed.h"
tomoya123 0:d53e9c6fc771 2 #include"HeptaBattery.h"
tomoya123 1:166ddf929155 3
tomoya123 0:d53e9c6fc771 4 Serial pc(USBTX,USBRX);
tomoya123 0:d53e9c6fc771 5 HeptaBattery battery(p16,p29,p26);
tomoya123 1:166ddf929155 6
tomoya123 0:d53e9c6fc771 7 int main(){
tomoya123 0:d53e9c6fc771 8 pc.baud(9600);
tomoya123 0:d53e9c6fc771 9 float bt;
tomoya123 0:d53e9c6fc771 10 for(int i=0;i<10;i++){
tomoya123 0:d53e9c6fc771 11 battery.vol(&bt);
tomoya123 0:d53e9c6fc771 12 pc.printf("Vol=%f\r\n",bt);
tomoya123 0:d53e9c6fc771 13 wait(1.0);
tomoya123 0:d53e9c6fc771 14 }
tomoya123 0:d53e9c6fc771 15 }
tomoya123 0:d53e9c6fc771 16