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@1:f01d67bcb993, 2020-04-11 (annotated)
- Committer:
- akumagame
- Date:
- Sat Apr 11 22:59:01 2020 +0000
- Revision:
- 1:f01d67bcb993
- Parent:
- 0:fe1cbc83cf4c
- Child:
- 2:7b09af16aee4
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 | 1:f01d67bcb993 | 6 | DigitalIn enable(SW2); |
akumagame | 0:fe1cbc83cf4c | 7 | |
akumagame | 0:fe1cbc83cf4c | 8 | void bot(int b) |
akumagame | 0:fe1cbc83cf4c | 9 | { |
akumagame | 0:fe1cbc83cf4c | 10 | if(enable == 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 |