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.
main.cpp@0:257b9f724901, 2019-10-07 (annotated)
- Committer:
- yamadakouhei
- Date:
- Mon Oct 07 04:50:24 2019 +0000
- Revision:
- 0:257b9f724901
sensa digital
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yamadakouhei | 0:257b9f724901 | 1 | #include "mbed.h" |
yamadakouhei | 0:257b9f724901 | 2 | |
yamadakouhei | 0:257b9f724901 | 3 | DigitalOut myled1(PTB8); |
yamadakouhei | 0:257b9f724901 | 4 | |
yamadakouhei | 0:257b9f724901 | 5 | DigitalIn sensor1(PTD7); |
yamadakouhei | 0:257b9f724901 | 6 | |
yamadakouhei | 0:257b9f724901 | 7 | int main() { |
yamadakouhei | 0:257b9f724901 | 8 | while(1) { |
yamadakouhei | 0:257b9f724901 | 9 | if(sensor1 == 0){ |
yamadakouhei | 0:257b9f724901 | 10 | myled1 = 1; |
yamadakouhei | 0:257b9f724901 | 11 | } |
yamadakouhei | 0:257b9f724901 | 12 | else if(sensor1 == 1){ |
yamadakouhei | 0:257b9f724901 | 13 | myled1 = 0; |
yamadakouhei | 0:257b9f724901 | 14 | } |
yamadakouhei | 0:257b9f724901 | 15 | } |
yamadakouhei | 0:257b9f724901 | 16 | } |