Hi everyone,
I’m pretty new to the whole platform and I would like to generate the following signal:
I’m using the LED1 on my NUCLEO-F767ZI to test my code.
#include “mbed.h”
// define digital output for pin 5
PwmOut led(LED1);
int main() {
int i;
for(i=0;i<1024;i++){
led = 0;
wait_us(5000000);
led = 1;
wait_us(5000000);
// specify period first, then everything else
led.period(1.0f); // 4 second period
led.write(0.9f); // 50% duty cycle
wait_us(5000000);
led = 0;
}
}
I really appreciate your feedback
best regards,
Ezzow