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:5a82eeefcf10, committed 2020-11-16
- Comitter:
- schnf30
- Date:
- Mon Nov 16 10:49:53 2020 +0000
- Commit message:
- Base
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.gitignore Mon Nov 16 10:49:53 2020 +0000 @@ -0,0 +1,4 @@ +.build +.mbed +projectfiles +*.py*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832.lib Mon Nov 16 10:49:53 2020 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/chris/code/C12832/#7de323fa46fe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 16 10:49:53 2020 +0000 @@ -0,0 +1,37 @@ +#include "mbed.h" +#include "C12832.h" +#include "platform/mbed_thread.h" + +// Rate acquisition +#define BLINKING_RATE_MS 500 +C12832 lcd(D11, D13, D12, D7, D10); +AnalogIn pot1 (A0); +AnalogIn pot2 (A1); + +int main() +{ + float Entree1,Entree2; + while (true) { + // acqusition des entrees + Entree1 = 3.3*pot1.read(); + Entree2 = 3.3*pot2.read(); + // traitement de l entree1 + + lcd.cls(); + lcd.locate(0,3); + if ( Entree1 < 0.36 ) { + lcd.printf("COURT CIRCUIT\n"); + } else if ( Entree1 < 0.88 ) { + lcd.printf("ANOMALIE\n"); + } else if ( Entree1 < 1.41 ) { + lcd.printf("PAS ANOMALIE\n"); + } else { + lcd.printf("COUPE DE CABLE\n"); + } + + lcd.locate(0,14); + lcd.printf("Pot 2 = %.2f", Entree2); + + thread_sleep_for(BLINKING_RATE_MS); //wait.... + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Mon Nov 16 10:49:53 2020 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#cf4f12a123c05fcae83fc56d76442015cb8a39e9