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:
- snec_student
- Date:
- 2020-07-21
- Revision:
- 28:c7875faa8ddf
- Parent:
- 27:53f556d60967
- Child:
- 29:45c879f917cf
File content as of revision 28:c7875faa8ddf:
#include "mbed.h"
DigitalOut Led_bleue(PTB21);
DigitalIn BP2(SW2);
int main() {
while(1) {
if (BP2==1) // si le BP2 est appuyé
{
Led_bleue=1; // on eteint la led bleue
}
else // sinon
{
Led_bleue=0; // on allume la led bleue
}
} // fin boucle infinie
} // fin programme