6 years, 11 months ago.

Seeed Arch Max!!!! this device not working RTOS!

#include "mbed.h"
#include "rtos.h"
 
DigitalOut led1(PA_6);
DigitalOut led2(PA_7);
Thread thread;
 
void led2_thread() {
    while (true) {
        led2 = !led2;
        Thread::wait(1000);
    }
}
 
int main() {
    thread.start(led2_thread);
    
    while (true) {
        led1 = !led1;
        Thread::wait(500);
    }
}

this example does not work

Be the first to answer this question.