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
Fork of NBoard_IO by
Revision 1:186d8e302a9e, committed 2016-11-07
- Comitter:
- gr66
- Date:
- Mon Nov 07 13:11:50 2016 +0000
- Parent:
- 0:859bc4257c1c
- Commit message:
- Example Serial Debug
Changed in this revision
NBoard_IO.cpp | Show diff for this revision Revisions of this file |
NBoard_Serial.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 859bc4257c1c -r 186d8e302a9e NBoard_IO.cpp --- a/NBoard_IO.cpp Mon Nov 07 11:13:20 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -#include "mbed.h" - -DigitalOut Led0(PB_3); // PB_3 port sur lequel est connecté la Led0 -BusOut MonBus(PA_7,PA_6); // creation bus -DigitalIn BP0(PA_9,PullUp); //PA_9 port sur lequel est connecté le BP0 -// -int main() { - while(1) { - Led0 = 1; // Led0 is ON - wait(0.2); // 200 ms - Led0 = 0; // Led0 is OFF - wait(0.5); // 1 sec - if(!BP0) MonBus=1; - else MonBus=2; - } -}
diff -r 859bc4257c1c -r 186d8e302a9e NBoard_Serial.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/NBoard_Serial.cpp Mon Nov 07 13:11:50 2016 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" + +Serial PC(USBTX,USBRX); +BusIn boutons(PA_9,PA_10,PB_0,PB_7); +// +int main() { + boutons.mode(PullUp); + PC.printf("Test Bus bouton \n"); + while(1) { + wait(0.5); + PC.printf("Bus Bouton = %02X \n", boutons.read()); + } +}