hello i have a NUCLEO-H7A3ZI-Q and i’m trying to learn how to control a servo -SG90. my program is on keil studio cloud, and it doesn’t look working Here is my programe
#include “mbed.h”
PwmOut servo(PB_3);
int main() {
servo.period_ms(20);
while (true) {
servo.pulsewidth_ms(1);
ThisThread::sleep_for(2s);
servo.pulsewidth_ms(1.5);
ThisThread::sleep_for(2s);
servo.pulsewidth_ms(2);
ThisThread::sleep_for(2s);
}
}
Thanks for your help