Arduino Forum

Topics => Robotics => Topic started by: AwesomeDeepesh on Dec 20, 2015, 12:10 pm

Title: Line maze solver/w shortest path algorithm
Post by: AwesomeDeepesh on Dec 20, 2015, 12:10 pm
hello every one....
I am trying to make a line maze solver with the shortest path algorithm
and I need a little help I have attached the code please have a look at it and help me out
and please tell me if I can do anything to replace the 999999999999999999999999999999
in my code




Thanks in advance to anyone who tries to help me out
Title: Re: Line maze solver/w shortest path algorithm
Post by: MarkT on Dec 20, 2015, 09:51 pm
You are going to need some datastructures to represent the maze.  Is that what the path thing is for?
Title: Re: Line maze solver/w shortest path algorithm
Post by: PaulS on Dec 21, 2015, 04:42 pm
Code: [Select]
char path[999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999]

I don't think my PC even has enough memory to hold that array, and it has 8,000,000 times as much memory as a Uno.
Title: Re: Line maze solver/w shortest path algorithm
Post by: AwesomeDeepesh on Dec 23, 2015, 06:09 pm
i have changed the 99999999999999999999999999999999999999999999999999999999999 to 500
Title: Re: Line maze solver/w shortest path algorithm
Post by: PaulS on Dec 23, 2015, 06:13 pm
i have hanged the 99999999999999999999999999999999999999999999999999999999999 to 999
And? What happened?
Title: Re: Line maze solver/w shortest path algorithm
Post by: AwesomeDeepesh on Dec 23, 2015, 06:26 pm
please refer to this website


http://embedjournal.com/shortest-path-line-follower-robot-logic-revealed/

I got the algorithm from here and I am not able to complete it...
I have fixed some parts of the code please review it
I am having trouble with the cancellation part
Title: Re: Line maze solver/w shortest path algorithm
Post by: AwesomeDeepesh on Dec 23, 2015, 06:34 pm
please review my updated code
Title: Re: Line maze solver/w shortest path algorithm
Post by: PaulS on Dec 23, 2015, 06:41 pm
The code you posted does what? How does that differ from what you want?