inter

Dependencies:   mbed

main.cpp

Committer:
danielgarciag
Date:
7 months ago
Revision:
0:e5582202e93b

File content as of revision 0:e5582202e93b:

#include "mbed.h"

DigitalOut led1(LED1);
InterruptIn BOTON(USER_BUTTON);
int i=0;
void vel1();
void vel2();




int main() {
    
BOTON.rise(&vel1);
    BOTON.fall(&vel2);
    while (1){
        
         led1 = !led1;
     wait_ms(i); 
        
        }
    
}    
 
 void vel1(){
    i=100;
       }
  void vel2(){
    i=500;
      }