mBlockly line sensor and repeatForever


#1

Hello All,

We purchased a bluetooth mBot for my son for Christmas. I was playing with it tonight to develop a program to drive up to a line and then follow it. When just testing the lineSensor blocks in mBlockly I am running into an issue.

I am just setting the LEDs to different colors based on the output of each line sensor. I did using the repeatForever block and manually driving the robot over the supplied line track.

After moving the robot into a few different positions the repeatForever loop will halt. I have to restart the robot to get it to loop again, but it will eventually halt again after a few seconds.

Any ideas? Attached is the simple program. Thanks.

Chris


#2