Buy an Axon, Axon II, or Axon Mote and build a great robot, while helping to support SoR.

0 Members and 1 Guest are viewing this topic.

array(floor(y),floor(x)) = 1; if (x-floor(x)) > 0 //Is the x value a decimal? array(floor(y),floor(x) + 1) = 1; // Set the other cell to 1endifif (y-floor(y)) > 0 //Is the y value a decimal? array(floor(y)+1,floor(x)) = 1; // Set the other cell to 1endifif ((x-floor(x)) > 0) && ((y-floor(y)) > 0) //Are both x and y values decimals? array(floor(y)+1,floor(x) + 1) = 1; // Set the other cell to 1endif

In each square you place a label.For example:1 = object2 = no object3 = robot4 = unmapped area

its for example you have a 200 at angle 60you mark this one as obstacle then you incremet it(the distance,200 here) by 3(or any small number) n you mark the coresponding squareas unknown and you still do this until you reach 255