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
main.cpp
- Committer:
- xavier_majorel
- Date:
- 2020-09-09
- Revision:
- 32:4d02d78d0c44
- Parent:
- 31:f4772bdf91c1
- Child:
- 33:710cfcf55052
File content as of revision 32:4d02d78d0c44:
#include "mbed.h" DigitalOut Led_verte(PTE26); DigitalOut Led_rouge(PTB22); DigitalIn BP2(PTC6); DigitalIn BP1(PTA4); int main() { while(1) { if (BP2==1) //si le BP2 est appuyé; { Led_verte=1; // on éteint la led verte } else // sinon { Led_verte=0; // on allume la led verte } if (BP1==1) //si le BP1 est appuyé; { Led_rouge=1; // on éteint la led rouge } else // sinon { Led_rouge=0; // on allume la led rouge } } // fin de boucle infinie } // fin programme