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:313f7b0a1e16, 2020-04-12 (annotated)
- Committer:
- omarem
- Date:
- Sun Apr 12 03:17:56 2020 +0000
- Revision:
- 0:313f7b0a1e16
Ejercicio3.Practica5
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| omarem | 0:313f7b0a1e16 | 1 | #include "mbed.h" |
| omarem | 0:313f7b0a1e16 | 2 | |
| omarem | 0:313f7b0a1e16 | 3 | Serial com1(USBTX, USBRX); |
| omarem | 0:313f7b0a1e16 | 4 | |
| omarem | 0:313f7b0a1e16 | 5 | |
| omarem | 0:313f7b0a1e16 | 6 | void Boton(int Si, int No) |
| omarem | 0:313f7b0a1e16 | 7 | { |
| omarem | 0:313f7b0a1e16 | 8 | int pulsado; |
| omarem | 0:313f7b0a1e16 | 9 | |
| omarem | 0:313f7b0a1e16 | 10 | pulsado = Si; |
| omarem | 0:313f7b0a1e16 | 11 | |
| omarem | 0:313f7b0a1e16 | 12 | com1.printf("El boton esta pulsado \n", pulsado); |
| omarem | 0:313f7b0a1e16 | 13 | |
| omarem | 0:313f7b0a1e16 | 14 | |
| omarem | 0:313f7b0a1e16 | 15 | int sinpulsar; |
| omarem | 0:313f7b0a1e16 | 16 | |
| omarem | 0:313f7b0a1e16 | 17 | sinpulsar = No; |
| omarem | 0:313f7b0a1e16 | 18 | |
| omarem | 0:313f7b0a1e16 | 19 | com1.printf("El boton no esta pulsado \n", sinpulsar); |
| omarem | 0:313f7b0a1e16 | 20 | |
| omarem | 0:313f7b0a1e16 | 21 | } |
| omarem | 0:313f7b0a1e16 | 22 | int main () |
| omarem | 0:313f7b0a1e16 | 23 | { |
| omarem | 0:313f7b0a1e16 | 24 | int e1,e2; |
| omarem | 0:313f7b0a1e16 | 25 | |
| omarem | 0:313f7b0a1e16 | 26 | e1 = 0; |
| omarem | 0:313f7b0a1e16 | 27 | e2 = !e1; |
| omarem | 0:313f7b0a1e16 | 28 | |
| omarem | 0:313f7b0a1e16 | 29 | Boton(e1,e2); |
| omarem | 0:313f7b0a1e16 | 30 | |
| omarem | 0:313f7b0a1e16 | 31 | |
| omarem | 0:313f7b0a1e16 | 32 | } |