Practica_6_-_Ejercicio_03

Dependencies:   mbed TextLCD Keypad

Committer:
isaacross99
Date:
Wed Oct 16 00:42:26 2019 +0000
Revision:
29:734b61eca6df
Parent:
28:868b283c5f77
Child:
30:f7518060fc89
p4e7

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dan 0:7dec7e9ac085 1 #include "mbed.h"
isaacross99 29:734b61eca6df 2 DigitalOut red(LED1);
rgsbuap 26:29f649949409 3 Serial pc(USBTX,USBRX);
isaacross99 29:734b61eca6df 4 DigitalIn boton1(PTC6);
isaacross99 29:734b61eca6df 5 DigitalIn boton2(PTA4);
isaacross99 29:734b61eca6df 6 int main(){
isaacross99 29:734b61eca6df 7 red=0;
isaacross99 29:734b61eca6df 8 while(1){
isaacross99 29:734b61eca6df 9 /*while(boton1 || boton2){
isaacross99 29:734b61eca6df 10 red = 1;
isaacross99 29:734b61eca6df 11 pc.printf("\nEstas presionando el boton :o");
isaacross99 29:734b61eca6df 12 }
isaacross99 29:734b61eca6df 13 red=0;*/
isaacross99 29:734b61eca6df 14 ////////////////////////////////////////////////////////////////////
isaacross99 29:734b61eca6df 15 if(!boton1 || !boton2){
isaacross99 29:734b61eca6df 16 red =1 ;
isaacross99 29:734b61eca6df 17 pc.printf("\nEstas presionando el boton :o");
isaacross99 29:734b61eca6df 18 }
isaacross99 29:734b61eca6df 19 else{
isaacross99 29:734b61eca6df 20 red=0;
isaacross99 29:734b61eca6df 21 }
isaacross99 28:868b283c5f77 22 }
isaacross99 28:868b283c5f77 23 }