Society of Robots - Robot Forum
Software => Software => Topic started by: newbie on August 24, 2008, 04:23:39 AM
-
basically i understand how the wavefront algorithm works but the c code = ??? :D
need someone to explain about the wavefront code:
1.int counter=0
what is counter? is it counter means times of run?
y++
x++
2.what do the above symbols mean?
!=
3.what does this symbol mean?
4.what do the "mean node location in up, down, left, right "mean?
the question is based on the irobot\wave_front.c
i will really appreciate if someone can explain the whole code to me. I am too greedy?? ;D ;)
Thank you.
-
It sounds like you are a very weak programmer . . .
http://www.societyofrobots.com/robot_faq.shtml#programming_tutorial
I suggest getting some books on programming in C:
http://www.societyofrobots.com/robot_faq.shtml#robot_books
It will really help you understand code.
Google around for programming tutorials too:
http://www.google.com/search?q=program+C+tutorial
counters are for while/for loops
y++;
is the same as
y=y+1;
!=
means
'does not equal'
what do the "mean node location in up, down, left, right "mean?
a node is a location in the grid
-
how i upload the code to my arduino , by using normal arduino official software or others using isp programmer?
my maze is 6x6 (although simple but i .... ???,haha), i do not know my goal coordinate and starting point coordinate, can i still using this method?
i want my robot has a speed run mode after the first searching mode, how to program it???
thank you.
pls reply :'(
-
you can just use the normal Arduino software
-
you can just use the normal Arduino software
i receive the below error:
error: 'long int map [6][6]' redeclared as different kind of symbolC:\Users\user\Desktop\arduino-0011\hardware\cores\arduino/WProgram.h:19: error: previous declaration of 'long int map(long int, long int, long int, long int, long int)'
In function 'int propagate_wavefront(int, int, int, int)':
In function 'void unpropagate(int, int)':
In function 'void clear_map()':
In function 'int min_surrounding_node_value(int, int)':
-
abs(new_state-old_state)==2
(signed int) (old_state-new_state)==-1
can anyone explain the above code? thank you in advance
-
Look through those links I sent you before. The answers are in those programming tutorials. Its very basic stuff, you just need to spend the time reading it . . .