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@3:32058377a827, 2020-04-13 (annotated)
- Committer:
- akumagame
- Date:
- Mon Apr 13 23:34:58 2020 +0000
- Revision:
- 3:32058377a827
- Parent:
- 2:7b09af16aee4
- Child:
- 4:87dc862ec3aa
l
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
akumagame | 0:fe1cbc83cf4c | 1 | #include "mbed.h" |
akumagame | 0:fe1cbc83cf4c | 2 | |
akumagame | 0:fe1cbc83cf4c | 3 | |
akumagame | 0:fe1cbc83cf4c | 4 | Serial com1(USBTX, USBRX); |
akumagame | 0:fe1cbc83cf4c | 5 | |
akumagame | 2:7b09af16aee4 | 6 | DigitalIn enable(PTA4); |
akumagame | 0:fe1cbc83cf4c | 7 | |
akumagame | 0:fe1cbc83cf4c | 8 | void bot(int b) |
akumagame | 0:fe1cbc83cf4c | 9 | { |
akumagame | 3:32058377a827 | 10 | if(enable.read() == 1) |
akumagame | 0:fe1cbc83cf4c | 11 | { |
akumagame | 0:fe1cbc83cf4c | 12 | com1.printf("El boton esta siendo presionado"); |
akumagame | 0:fe1cbc83cf4c | 13 | |
akumagame | 0:fe1cbc83cf4c | 14 | } |
akumagame | 0:fe1cbc83cf4c | 15 | |
akumagame | 0:fe1cbc83cf4c | 16 | else |
akumagame | 0:fe1cbc83cf4c | 17 | { |
akumagame | 0:fe1cbc83cf4c | 18 | com1.printf("El boton esta no esta siendo presionado" ); |
akumagame | 0:fe1cbc83cf4c | 19 | |
akumagame | 0:fe1cbc83cf4c | 20 | } |
akumagame | 0:fe1cbc83cf4c | 21 | |
akumagame | 0:fe1cbc83cf4c | 22 | } |
akumagame | 0:fe1cbc83cf4c | 23 | |
akumagame | 0:fe1cbc83cf4c | 24 | int main() |
akumagame | 0:fe1cbc83cf4c | 25 | { |
akumagame | 0:fe1cbc83cf4c | 26 | |
akumagame | 0:fe1cbc83cf4c | 27 | com1.printf("%i",bot); |
akumagame | 0:fe1cbc83cf4c | 28 | |
akumagame | 0:fe1cbc83cf4c | 29 | } |
akumagame | 0:fe1cbc83cf4c | 30 | |
akumagame | 0:fe1cbc83cf4c | 31 |