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
NBoard_IO.cpp@1:af1bd60bfb56, 2016-11-07 (annotated)
- Committer:
- gr66
- Date:
- Mon Nov 07 20:35:15 2016 +0000
- Revision:
- 1:af1bd60bfb56
- Parent:
- 0:859bc4257c1c
v11
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gr66 | 0:859bc4257c1c | 1 | #include "mbed.h" |
gr66 | 0:859bc4257c1c | 2 | |
gr66 | 0:859bc4257c1c | 3 | DigitalOut Led0(PB_3); // PB_3 port sur lequel est connecté la Led0 |
gr66 | 0:859bc4257c1c | 4 | BusOut MonBus(PA_7,PA_6); // creation bus |
gr66 | 0:859bc4257c1c | 5 | DigitalIn BP0(PA_9,PullUp); //PA_9 port sur lequel est connecté le BP0 |
gr66 | 0:859bc4257c1c | 6 | // |
gr66 | 0:859bc4257c1c | 7 | int main() { |
gr66 | 0:859bc4257c1c | 8 | while(1) { |
gr66 | 0:859bc4257c1c | 9 | Led0 = 1; // Led0 is ON |
gr66 | 0:859bc4257c1c | 10 | wait(0.2); // 200 ms |
gr66 | 0:859bc4257c1c | 11 | Led0 = 0; // Led0 is OFF |
gr66 | 1:af1bd60bfb56 | 12 | wait(0.2); // 200 ms |
gr66 | 0:859bc4257c1c | 13 | if(!BP0) MonBus=1; |
gr66 | 0:859bc4257c1c | 14 | else MonBus=2; |
gr66 | 0:859bc4257c1c | 15 | } |
gr66 | 0:859bc4257c1c | 16 | } |