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:09e28076eda0, 2020-11-01 (annotated)
- Committer:
- dnluna_
- Date:
- Sun Nov 01 00:01:02 2020 +0000
- Revision:
- 0:09e28076eda0
P3E2SDR2020;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dnluna_ | 0:09e28076eda0 | 1 | #include "mbed.h" |
dnluna_ | 0:09e28076eda0 | 2 | #include <iostream> |
dnluna_ | 0:09e28076eda0 | 3 | #include <stdio.h> |
dnluna_ | 0:09e28076eda0 | 4 | |
dnluna_ | 0:09e28076eda0 | 5 | |
dnluna_ | 0:09e28076eda0 | 6 | Serial com1(USBTX, USBRX); |
dnluna_ | 0:09e28076eda0 | 7 | DigitalIn boton1(p6); |
dnluna_ | 0:09e28076eda0 | 8 | DigitalOut myled(p5); |
dnluna_ | 0:09e28076eda0 | 9 | |
dnluna_ | 0:09e28076eda0 | 10 | int main() |
dnluna_ | 0:09e28076eda0 | 11 | { |
dnluna_ | 0:09e28076eda0 | 12 | while(1) |
dnluna_ | 0:09e28076eda0 | 13 | { |
dnluna_ | 0:09e28076eda0 | 14 | if (boton1.read()==0) |
dnluna_ | 0:09e28076eda0 | 15 | { |
dnluna_ | 0:09e28076eda0 | 16 | myled=1; |
dnluna_ | 0:09e28076eda0 | 17 | } |
dnluna_ | 0:09e28076eda0 | 18 | |
dnluna_ | 0:09e28076eda0 | 19 | else{ |
dnluna_ | 0:09e28076eda0 | 20 | myled=0; |
dnluna_ | 0:09e28076eda0 | 21 | } |
dnluna_ | 0:09e28076eda0 | 22 | } |
dnluna_ | 0:09e28076eda0 | 23 | } |
dnluna_ | 0:09e28076eda0 | 24 | |
dnluna_ | 0:09e28076eda0 | 25 |