Servo not “accepting” while loops

Was told to try here instead

I’m just trying to get my servo to round in a while loop but it just does nothing. I’ve tried for loops and it works

I’ve put a print command in and when I use a for loop, i see “hello” but when I use the while, nothing happens??

How do i fix?

#include "Mx28.h"

#define SERVO_ID 0x01

Serial pc(USBTX, USBRX);

int main () {

DynamixelClass my(57600, PTC17, PTC16);

//int pos = my.readPosition(SERVO_ID);





my.servo(1, 0x000, 0x400);

wait (2.0);

//for(int i = 0; i <5; i++)

while(true) {

wait (2.0);

my.servo(1, 0x400, 0x100);


my.servo(1, 0xC00, 0x200);



submitted by /u/MLbeginner96
[link] [comments]