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:a7dc731f6246, committed 2016-05-02
- Comitter:
- jomfec
- Date:
- Mon May 02 09:06:43 2016 +0000
- Commit message:
- INFO2
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 Mon May 02 09:06:43 2016 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" +PwmOut moteur(p21); +float intensite=0.0015; +char c; + +int main() +{ + moteur.period(0.020); + printf("Controle intensite de la Led\n"); + + + while(1) { + + printf("Pressez + ou - \n"); + scanf("%c",&c); + + wait(0.001); + if((c == 'a') && (intensite < 0.002)) { + + intensite += 0.0001; + moteur.pulsewidth(intensite); + } + if((c == 'z') && (intensite > 0.001)) { + intensite -= 0.0001; + moteur.pulsewidth(intensite); + } + printf("%c %g \n ",c, intensite); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon May 02 09:06:43 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/87f2f5183dfb \ No newline at end of file