Here is my code:
I’m not sure what is wrong with it. The turn right function works properly, but turning left makes the robot turn 180 degrees instead of 90.
I’m using a mBot and the makeblock Me 3-Axis Accelerometer and Gyro Sensor V1.2
Variables gyro_z_offset is defined to be the current angle of the robot at the start of the program and ideal angle is set to 0 (also at the start)