Hi, i was trying to do some stuff similar to 6/24's lesson today. i want the robot to continue going in the same direction even if you pick it up and move it. I am trying to get the gyro sensor to track the change in direction and right its self. heres my code along with is errors (at the bottom) i put @ where the errors are. any thouhts??

// Calculate the new heading by adding the amount of degrees // we've turned in the last 20ms // If our current rate of rotation is 100 degrees/second, // then we will have turned 100 * (20/1000) = 2 degrees since // the last time we measured. heading += rotSpeed * 0.02;

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum