
.
Revision 0:e1c733f6bc37, committed 2020-04-11
- Comitter:
- karlaivon
- Date:
- Sat Apr 11 14:57:49 2020 +0000
- Commit message:
- .
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Apr 11 14:57:49 2020 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" + +Serial luz(USBTX, USBRX); + +DigitalIn boton(PTA4); //PTA4 siendo boton libre en tarjeta, se configura de acuerdo a pin +DigitalIn botona(PTA6); //PTA6 siendo boton libre en tarjeta, se configura de acuerdo a pin +DigitalOut L1(LED1); + +int main() { + + boton.mode(PullUp); + botona.mode(PullUp); + + while(1) { + + if(boton == 1){L1 = 1; luz.printf("Holiiss, mundo!\n");} + else {L1 = 0;} + + if(botona == 1) {L1 = 1; luz.printf("Holiiss, mundo!\n");} + else { L1 = 0;} + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Apr 11 14:57:49 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file