Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi all,
Just help me confirm some definitions in PwmOut library
DutyCycle ?
pulsewidth ?
Period?
From my understand, dutycycle = pulsewidth/period ? is it correct ?
I write a test to generate a frequency with dutycycle = 50% with PwmOut connect to LED1 but seem it doesnot work.
#include "mbed.h"
PwmOut led(LED1);
int main() {
while(1)
{
led.pulsewidth(0.5f);
led.period(1.0f);
}
}