Hello! I am new to mBot and coding and I am having problems making my code transfer over to my robot. What I am trying to do is move forward at speed 100 until it gets within 7 cm of an object and turn right. Once it turns right, the lights must turn green and sound D3 as whole notes distinctly 5 times.
The problem I am having is keeping track of the total number of turns using the variable “TurnCount” and once the TurnCount reaches 3, the lights have to turn red and play D4, 4 times. Also the robot must start on the start line and stop on the finish line.
Please help! Below is what I have so far. Everything works except the turn count.