This project has moved. For the latest updates, please go here.

Has anyone tried to program a Maze Solver ?

Jan 16, 2014 at 4:30 PM
Edited Jan 16, 2014 at 4:32 PM
Hi all,

I was working on a Maze Solver program with the Lego Programming Environment
but I wasn't too enthused with the limited graphical programming IDE.

The Lego Robot has an Infrared Distance Sensor mounted on the left side of the robot ( to detect if wall is on the left ) and a Touch Sensor on the front (to detect bumping into a wall )

So, I was hoping to be able to code a Maze Solver program remotely using the dotnet API.
But, this requires continuous remote detection of Sensor values such as Infrared Sensor Distance from a wall.
Thus, I was wondering if this is workable solution as opposed to the standard way of developing the Lego Code and downloading to the brick to run ?

__If so, is the communication delay of reading sensor values from the brick and then sending commands back to the brick too slow to be practical ?
__
Thanks, Paul
Jan 16, 2014 at 5:01 PM
I doubt the communication speed would be too slow, and if it is for some reason, you can always write code that forces it to wait for a response or check a sensor value before sending the next command. You could also change the drive speed of your robot so that the sensors can send more (and in some cases, more accurate) data. The ability to make more complex decisions and algorithms more easily and efficiently is one of the advantages of using .NET (or some other full-fledged programming language) rather than the Lego IDE.
Jan 18, 2014 at 7:43 PM
@ njsokalski,

Thanks for the feedback ! :)

I will try it this weekend. This is a new adventure for me.
Programming with:
  • asynchronous communications / timing issues
  • monitoring multiple sensors ( via BrickChanged event )
  • sending single and batch commands to the brick.
I will be using a Wifi connection ( I borrowed it )
and will try the Bluetooth down the road.

Thanks, Paul