You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
In the other issue ppl said because it was D8, which was causing the problems, but it's not. D3 works fine in classic, doesn't work in mbed OS.
mbed Classic (works):
#include"mbed.h"
PwmOut led(D3);
intmain() {
while(1) {
for(float p = 0.0f; p < 1.0f; p += 0.1f) {
led = p;
wait(0.1);
}
}
}
mbed OS, doesnt work:
static PwmOut led(D3);
float a = 0.0f;
staticvoidblinky(void) {
a += 0.1f;
if (a > 1.0f) a = 0.0f;
led = a;
}
voidapp_start(int, char**) {
get_stdio_serial().baud(115200);
minar::Scheduler::postCallback(blinky).period(minar::milliseconds(100));
}
This is kind of a real problem for me, as a bunch of things I need to demo on Monday require PWM...
The text was updated successfully, but these errors were encountered:
In the other issue ppl said because it was D8, which was causing the problems, but it's not. D3 works fine in classic, doesn't work in mbed OS.
mbed Classic (works):
mbed OS, doesnt work:
This is kind of a real problem for me, as a bunch of things I need to demo on Monday require PWM...
The text was updated successfully, but these errors were encountered: