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:
- 4:fb4dff674d64
- Parent:
- 3:a19488e21195
--- a/main.cpp Wed Sep 30 13:25:59 2020 +0000
+++ b/main.cpp Wed Sep 30 15:01:49 2020 +0000
@@ -3,35 +3,30 @@
InterruptIn KBI_SW3(SW3);
Serial pc(USBTX, USBRX, 9600);
+void appeler_message(unsigned char afficheur, unsigned char message)
+{
+ pc.putc(0x01);
+ pc.printf("%03u",afficheur);
+ pc.putc(0x1D);
+ pc.printf("%03u",message);
+ pc.putc(0x04);
+ wait(0.01);
+}
+
void IT_SW2()
{
-pc.printf("appui sur SW2\n");
-}
-
-void RT_SW2()
-{
-pc.printf("relachement sur SW2\n");
+ appeler_message(17,2); // afficheur 17 message 2
}
void IT_SW3()
{
-pc.printf("appui sur SW3\n");
-}
-
-void RT_SW3()
-{
-pc.printf("relachement sur SW3\n");
+ appeler_message(17,3); // afficheur 17 message 3
}
main()
{
- KBI_SW2.fall(&IT_SW2);
- KBI_SW2.rise(&RT_SW2);
- KBI_SW3.fall(&IT_SW3);
- KBI_SW3.rise(&RT_SW3);
+ KBI_SW2.fall(&IT_SW2);
+ KBI_SW3.fall(&IT_SW3);
- while (1)
- {
-
- }
+ while (1) {}
}
\ No newline at end of file