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.
Exercice_.cpp
00001 /*#include "mbed.h" 00002 Serial pc(USBTX, USBRX); 00003 PwmOut Vs(LED1); 00004 float intensite=0.0; 00005 int main() 00006 { 00007 pc.printf("Contrôle de l’intensité de la Led\n\r"); 00008 pc.printf("Pressez ‘+’ ou ‘-’\n\r"); 00009 while(1) { 00010 char c = pc.getc(); 00011 wait(0.001); 00012 if((c == '+') && (intensite < 0.1)) { 00013 intensite += 0.001; 00014 Led.write(intensite); 00015 } 00016 if((c == '-') && (intensite > 0.0)) { 00017 intensite-= 0.001; 00018 Led.write(intensite); 00019 } 00020 pc.printf("%c %1.3f\n\r",c, intensite); 00021 } 00022 }*/
Generated on Wed Jul 13 2022 07:32:21 by
1.7.2