#include "mbed.h"
using namespace mbed;
using namespace rtos;
using namespace std::chrono;
DigitalOut led(p0);
DigitalIn Button(p1);
int x = 1000;
int main (){
while (true) {
led = !led;
ThisThread::sleep_for(x);
if (Button == 1){
x = x-50;
}
if(x==1){
x=1000;
}
}
}