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@25:869f212440f8, 2020-04-11 (annotated)
- Committer:
- montse
- Date:
- Sat Apr 11 10:52:53 2020 +0000
- Revision:
- 25:869f212440f8
- Parent:
- 24:7f14b70fc9ef
- Child:
- 26:0d2df6a1ed26
Ejercicio 2 de la practica 3.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| montse | 25:869f212440f8 | 1 | #include "mbed.h" //libreria que nos permite utilizar comandos y sentencias propias de mbed |
| montse | 25:869f212440f8 | 2 | #include <iostream> |
| montse | 25:869f212440f8 | 3 | #include <stdio.h> |
| dan | 0:7dec7e9ac085 | 4 | |
| montse | 25:869f212440f8 | 5 | //Crear un programa el cual al presionar un botón encienda un LED y al dejar de presionar que lo apague. |
| montse | 25:869f212440f8 | 6 | |
| montse | 25:869f212440f8 | 7 | Serial com1(USBTX, USBRX); |
| montse | 25:869f212440f8 | 8 | DigitalIn boton1(PTC6); |
| dan | 0:7dec7e9ac085 | 9 | DigitalOut myled(LED1); |
| dan | 0:7dec7e9ac085 | 10 | |
| montse | 25:869f212440f8 | 11 | int main() |
| montse | 25:869f212440f8 | 12 | { |
| montse | 25:869f212440f8 | 13 | while(boton1==1) |
| montse | 25:869f212440f8 | 14 | { |
| montse | 25:869f212440f8 | 15 | myled = 1; |
| montse | 25:869f212440f8 | 16 | } |
| dan | 0:7dec7e9ac085 | 17 | } |
| montse | 25:869f212440f8 | 18 | |
| montse | 25:869f212440f8 | 19 | |
| montse | 25:869f212440f8 | 20 | |
| montse | 25:869f212440f8 | 21 |