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:
- cr7sim
- Date:
- 2020-09-09
- Revision:
- 29:c7336563fcd7
- Parent:
- 28:92e2e6708035
- Child:
- 30:643834f77e0d
File content as of revision 29:c7336563fcd7:
#include "mbed.h" DigitalOut Led_verte(LED2); DigitalOut Led_rouge(LED1); DigitalIn BP3 (SW3); DigitalIn BP2 (SW2); int main() { Led_verte=0; // allume la led verte Led_rouge=0; //allume la led rouge while(1) { if (BP2==0) // si le BP2 est appuyé { Led_verte=1; // on eteint la led rouge } else // sinon { Led_verte=0; //on allume la led rouge } if (BP3==0) // si le BP2 est appuyé { Led_rouge=1; // on eteint la led rouge } else // sinon { Led_rouge=0; // on allume la led rouge } // fin boucle infinie } // fin programme }