Skip to content
Permalink
b88e8e0ce1
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
22 lines (17 sloc) 499 Bytes
#include "mbed.h"
int main() {
// put your setup code here, to run once:
//Setup the LED1 pin to be a digital output called ledOne
DigitalOut ledOne(LED1);
while(1) {
// put your main code here, to run repeatedly:
printf("Loop\n");
ledOne = 1;
//wait_ms(1000); //MBED OS 6 has deprecated wait / wait_ms
// Therefore use sleep_for
ThisThread::sleep_for(1000ms);
ledOne = 0;
// We can still use wait_ns though
ThisThread::sleep_for(2000ms);
}
}