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.
Dependencies: mbed
Revision 0:d9a5e5f8af4b, committed 2021-01-19
- Comitter:
- gtarronge1
- Date:
- Tue Jan 19 10:54:56 2021 +0000
- Commit message:
- moteur barre
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jan 19 10:54:56 2021 +0000 @@ -0,0 +1,36 @@ +#include "mbed.h" + +DigitalOut led(LED1); +PwmOut pwm(p25); +DigitalOut sens1(p10); +DigitalOut sens2(p14); + +Serial pc(USBTX, USBRX, 9600); + +int main(void) +{ + + sens1=1; + sens2=0; + + pwm.period_ms(1); + pwm.write(1.0f); + + Timer timer; + timer.start(); + + while(1) + { + if(timer.read() > 1.0f) + { +// sens1 = (sens1==1)?0:1; +// sens2 = (sens2==1)?0:1; + sens1=!sens1; + sens2=!sens2; + + timer.reset(); + + } + } + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Jan 19 10:54:56 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file