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
Diff: main.cpp
- Revision:
- 1:bd98c63b7cf5
- Parent:
- 0:618c97ce1b93
- Child:
- 2:de8cec36a564
--- a/main.cpp Wed Sep 30 12:55:12 2020 +0000
+++ b/main.cpp Wed Sep 30 13:02:41 2020 +0000
@@ -1,20 +1,17 @@
#include "mbed.h"
-DigitalIn BP_SW2(SW2);
-DigitalIn BP_SW3(SW3);
+InterruptIn KBI_SW2(SW2);
Serial pc(USBTX, USBRX, 9600);
-int main ()
+void IT_SW2()
{
- while (1) {
+pc.printf("appui sur SW2\n");
+}
- if (BP_SW2==0) {
- pc.printf("appui sur SW2 \n");
- wait(0.5);
- }
- if (BP_SW3==0) {
- pc.printf("appui sur SW3 \n");
- wait(0.5);
- }
-
+main()
+{
+ KBI_SW2.rise(&IT_SW2);
+ while (1)
+ {
+
}
}
\ No newline at end of file