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@4:87dc862ec3aa, 2020-04-15 (annotated)
- Committer:
- akumagame
- Date:
- Wed Apr 15 23:23:09 2020 +0000
- Revision:
- 4:87dc862ec3aa
- Parent:
- 3:32058377a827
- Child:
- 5:45bfe4a9d0a0
f
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 | 4:87dc862ec3aa | 6 | DigitalIn enable(PTA6); |
akumagame | 0:fe1cbc83cf4c | 7 | |
akumagame | 0:fe1cbc83cf4c | 8 | void bot(int b) |
akumagame | 0:fe1cbc83cf4c | 9 | { |
akumagame | 4:87dc862ec3aa | 10 | while(1) |
akumagame | 4:87dc862ec3aa | 11 | |
akumagame | 4:87dc862ec3aa | 12 | { |
akumagame | 4:87dc862ec3aa | 13 | if(enable.read()== 0) |
akumagame | 0:fe1cbc83cf4c | 14 | { |
akumagame | 0:fe1cbc83cf4c | 15 | com1.printf("El boton esta siendo presionado"); |
akumagame | 0:fe1cbc83cf4c | 16 | |
akumagame | 0:fe1cbc83cf4c | 17 | } |
akumagame | 0:fe1cbc83cf4c | 18 | |
akumagame | 0:fe1cbc83cf4c | 19 | else |
akumagame | 0:fe1cbc83cf4c | 20 | { |
akumagame | 0:fe1cbc83cf4c | 21 | com1.printf("El boton esta no esta siendo presionado" ); |
akumagame | 0:fe1cbc83cf4c | 22 | |
akumagame | 0:fe1cbc83cf4c | 23 | } |
akumagame | 4:87dc862ec3aa | 24 | } |
akumagame | 0:fe1cbc83cf4c | 25 | } |
akumagame | 0:fe1cbc83cf4c | 26 | |
akumagame | 0:fe1cbc83cf4c | 27 | int main() |
akumagame | 0:fe1cbc83cf4c | 28 | { |
akumagame | 0:fe1cbc83cf4c | 29 | |
akumagame | 0:fe1cbc83cf4c | 30 | com1.printf("%i",bot); |
akumagame | 0:fe1cbc83cf4c | 31 | |
akumagame | 0:fe1cbc83cf4c | 32 | } |
akumagame | 0:fe1cbc83cf4c | 33 | |
akumagame | 0:fe1cbc83cf4c | 34 |