Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:21a112c29646, committed 2016-06-24
- Comitter:
- gr67
- Date:
- Fri Jun 24 07:45:41 2016 +0000
- Commit message:
- xx
Changed in this revision
diff -r 000000000000 -r 21a112c29646 C12832.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832.lib Fri Jun 24 07:45:41 2016 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/chris/code/C12832/#7de323fa46fe
diff -r 000000000000 -r 21a112c29646 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Jun 24 07:45:41 2016 +0000 @@ -0,0 +1,40 @@ +#include "mbed.h" +#include "C12832.h" +C12832 lcd(D11, D13, D12, D7, D10); +AnalogIn tension(PB_1); +AnalogIn courant(PB_2); +Ticker integ; +Ticker affich; +//DigitalOut led(LED1); + +float V=1.3,I=0.4,P,E=0; + +void energie() +{ + V = 17*tension.read(); // + + I = 170*courant.read(); + P=V*I; + E = E+P*0.1; +} +void linky() +{ + lcd.locate(0,10); + lcd.printf("V=%4.1f V , I=%4.1f mA \nP=%4.0f mW E=%6.4f Wh", V,I,P,E/3600000); +} +int main() +{ + + integ.attach(&energie,0.1); + affich.attach(&linky,1.0); + lcd.cls(); + lcd.locate(0,0); + lcd.printf("LINKY LIKE"); + + while(1) { + + + + + } +}
diff -r 000000000000 -r 21a112c29646 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Jun 24 07:45:41 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7c328cabac7e \ No newline at end of file