Maze solver (take everything)

hello i wondering could 3pi take all on maze solver?

we working on school project and we could’nt make take all line.
we change to right but still not take all line so i wonder how we could make it?
i hope you guys understand what i mean

and i have other problem on music we tried with fun but its sound diffrent on supermario theme here the code what we did

    play(">>e32");
        delay_ms(150); 
		play(">e32");
        delay_ms(150); 
		play(">e32");
        delay_ms(150); 
		play(">c32");
        delay_ms(150); 
		play(">e32");
        delay_ms(150); 
		play(">g32");
        delay_ms(150); 
		play(">g32");
        delay_ms(150); 

		play(">c2");
        delay_ms(150); 
		play(">g10");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">b");
        delay_ms(150); 
		play(">a#");
		delay_ms(150); 
		play(">g");
		delay_ms(150); 


        play(">e");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">f");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">e");
		delay_ms(150); 
		play(">c");
		delay_ms(150);
	    play(">d");
        delay_ms(150); 
		play(">b");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">b");
        delay_ms(150); 

		play(">a#");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">g");
        delay_ms(150);





       


        play(">a");
        delay_ms(150); 
		play(">f");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">d");
		delay_ms(150); 
		play(">b");
	    delay_ms(150);


		


        play(">>g");
        delay_ms(150); 
		play(">f#");
        delay_ms(150); 
		play(">f");
        delay_ms(150); 
		play(">d#");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">g#");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 

		play(">c");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">d");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">f#");
		delay_ms(150); 
		play(">f");
		delay_ms(150); 


        play(">e");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">c-");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">f#");
		delay_ms(150); 
		play(">f");
		delay_ms(150);
	    play(">d#");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">g#");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 

		play(">d");
        delay_ms(150); 
		play(">d#");
        delay_ms(150); 
		play(">d");
        delay_ms(150); 
		play(">c");
        delay_ms(150);








		play(">>g");
        delay_ms(150); 
		play(">f#");
        delay_ms(150); 
		play(">f");
        delay_ms(150); 
		play(">d#");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">g#");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 

		play(">c");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">d");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">f#");
		delay_ms(150); 
		play(">f");
		delay_ms(150); 


        play(">e");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">c-");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">f#");
		delay_ms(150); 
		play(">f");
		delay_ms(150);
	    play(">d#");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">g#");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 

		play(">d");
        delay_ms(150); 
		play(">d#");
        delay_ms(150); 
		play(">d");
        delay_ms(150); 
		play(">c");
        delay_ms(150);



		
    play(">>g");
        delay_ms(150); 
		play(">f#");
        delay_ms(150); 
		play(">f");
        delay_ms(150); 
		play(">d#");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">g#");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 

		play(">c");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">d");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">f#");
		delay_ms(150); 
		play(">f");
		delay_ms(150); 


        play(">e");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">c-");
        delay_ms(150); 
		play(">g");
        delay_ms(150); 
		play(">f#");
		delay_ms(150); 
		play(">f");
		delay_ms(150);
	    play(">d#");
        delay_ms(150); 
		play(">e");
        delay_ms(150); 
		play(">g#");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">a");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 

		play(">d");
        delay_ms(150); 
		play(">d#");
        delay_ms(150); 
		play(">d");
        delay_ms(150); 
		play(">c");
        delay_ms(150);















   play(">>c");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">D");
        delay_ms(150); 
		play(">E");
        delay_ms(150); 
		play(">C");
        delay_ms(150); 

		play(">A");
        delay_ms(150); 
		play(">G");
        delay_ms(150); 
		play(">C");
        delay_ms(150); 
		play(">C");
        delay_ms(150); 
		play(">C");
        delay_ms(150); 
		play(">C");
		delay_ms(150); 
		play(">D");
		delay_ms(150); 


        play(">e");
        delay_ms(150); 
		play(">c");
        delay_ms(150); 
		play(">A");
        delay_ms(150); 
		play(">G");
        delay_ms(150); 
		play(">E");
        delay_ms(150); 
		play(">E");
		delay_ms(150); 
		play(">E");
		delay_ms(150);
	    play(">C");
        delay_ms(150); 
		play(">E");
        delay_ms(150); 
		play(">G");
        delay_ms(150); 
		play(">G");
        delay_ms(150); 
		play(">E");
        delay_ms(150); 
		play(">C");
        delay_ms(150); 
		play(">G");
        delay_ms(150); 

		play(">G#");
        delay_ms(150); 
		play(">A");
        delay_ms(150); 
		play(">F");
        delay_ms(150); 
		play(">F");
        delay_ms(150);





       


        play(">a");
        delay_ms(150); 
		play(">A");
        delay_ms(150); 
		play(">B");
        delay_ms(150); 
		play(">A");
        delay_ms(150); 
		play(">A-");
        delay_ms(150); 
		play(">A");
		delay_ms(150); 
		play(">G");
	    delay_ms(150);










   play(">>F");
        delay_ms(150); 
		play(">E");
        delay_ms(150); 
		play(">C");
        delay_ms(150); 
		play(">A");
        delay_ms(150); 
		play(">G");
        delay_ms(150); 
		play(">E");
        delay_ms(150); 
		play(">C");
        delay_ms(150); 

		play(">G");
        delay_ms(150); 
		play(">G#");
        delay_ms(150); 
		play(">A");
        delay_ms(150); 
		play(">F");
        delay_ms(150); 
		play(">F");
        delay_ms(150); 
		play(">A");
		delay_ms(150); 
		play(">B");
		delay_ms(150); 


        play(">F");
        delay_ms(150); 
		play(">F");
        delay_ms(150); 
		play(">F");
        delay_ms(150); 
		play(">E");
        delay_ms(150); 
		play(">D");
        delay_ms(150); 
		play(">C");
		delay_ms(150); 

is there other way to write code?

Hello.

Sorry, I don’t really understand what you mean about maze solving. The 3pi robot can be programmed to a maze solver, there is a section of the User’s guide that covers maze solving. Are you asking if a 3pi robot can be programmed to exhaustively search all of the parts of a maze?

As for your music, you can definitely write that in a more compact way. Look at the documentation for play in the Command reference For example, you could write:

play(">>e32");
delay_ms(150); 
play(">e32");

as

play(">>e32>e32");

If that plays too fast for you, you can change the tempo or add rests where you need them.

- Ryan

yes about the mazesolver code, we are using one of the example programs for maze solving. now we want to improv the code so that the robot explore the whole maze before it stops at the finish. This dosent seem like an esay thing to do? :confused: But we would be really happy if you could help us, or just give us some tips. :slight_smile:

Thanks for the music info :slight_smile:

Hello.

Does your maze have loops? If it doesn’t have loops you can probably do what you want but I don’t see why you would want to because it wouldn’t help you find a quicker route. To do it, you would just do the do the left-hand-on-wall strategy and keep track of your intersections well.

If the maze does have loops, you need to make a map of the maze in the memory of the robot. There is a little description of a looped-maze solver on the 3pi robot video Maze solving page.

-Ryan