Arduino_BlinkWithoutDelay_Timeout sample code ported. It should work according to mbed Handbook, BUT IT DOESN'T!!! Do you have any idea?

Dependencies:   mbed

main.cpp

Committer:
homayoun
Date:
2014-09-03
Revision:
0:ddd5359cb1e3

File content as of revision 0:ddd5359cb1e3:

#include "mbed.h"
 
Timeout flipper;
DigitalOut led1(LED1);

void flip() {
    led1 = !led1;
}

void setup() {
  flipper.attach(&flip, 1.0); // setup flipper to call flip after 1 seconds
}

void loop() {
  // put your main code here, to run repeatedly: 
    
}

int main()
{
    setup();
    while(1) loop();
}