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@0:618c97ce1b93, 2020-09-30 (annotated)
- Committer:
- marques_rascol
- Date:
- Wed Sep 30 12:55:12 2020 +0000
- Revision:
- 0:618c97ce1b93
- Child:
- 1:bd98c63b7cf5
appui SW2 appui SW3;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| marques_rascol | 0:618c97ce1b93 | 1 | #include "mbed.h" |
| marques_rascol | 0:618c97ce1b93 | 2 | DigitalIn BP_SW2(SW2); |
| marques_rascol | 0:618c97ce1b93 | 3 | DigitalIn BP_SW3(SW3); |
| marques_rascol | 0:618c97ce1b93 | 4 | Serial pc(USBTX, USBRX, 9600); |
| marques_rascol | 0:618c97ce1b93 | 5 | |
| marques_rascol | 0:618c97ce1b93 | 6 | int main () |
| marques_rascol | 0:618c97ce1b93 | 7 | { |
| marques_rascol | 0:618c97ce1b93 | 8 | while (1) { |
| marques_rascol | 0:618c97ce1b93 | 9 | |
| marques_rascol | 0:618c97ce1b93 | 10 | if (BP_SW2==0) { |
| marques_rascol | 0:618c97ce1b93 | 11 | pc.printf("appui sur SW2 \n"); |
| marques_rascol | 0:618c97ce1b93 | 12 | wait(0.5); |
| marques_rascol | 0:618c97ce1b93 | 13 | } |
| marques_rascol | 0:618c97ce1b93 | 14 | if (BP_SW3==0) { |
| marques_rascol | 0:618c97ce1b93 | 15 | pc.printf("appui sur SW3 \n"); |
| marques_rascol | 0:618c97ce1b93 | 16 | wait(0.5); |
| marques_rascol | 0:618c97ce1b93 | 17 | } |
| marques_rascol | 0:618c97ce1b93 | 18 | |
| marques_rascol | 0:618c97ce1b93 | 19 | } |
| marques_rascol | 0:618c97ce1b93 | 20 | } |