Battery
Dependencies: mbed PowerControl SDFileSystem
Fork of HeptaBattery by
main.cpp@2:f82baa83591f, 2016-12-13 (annotated)
- Committer:
- MEXT1
- Date:
- Tue Dec 13 10:48:51 2016 +0000
- Revision:
- 2:f82baa83591f
- Parent:
- 1:166ddf929155
Battery
Who changed what in which revision?
User | Revision | Line number | New 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 |