My robot takes the balls to 1 and puts at 2, corresponding to the following image:

I am using the following robot:

With motors and sensors in the following ports:

Motor A and B corresponds with the two wheels.Motor C corresponds to the claws.

Last edited by lololol on Sat Jan 31, 2009 11:11 am, edited 5 times in total.

Wed Jan 14, 2009 7:30 am

lololol

Rookie

Joined: Sat Jan 10, 2009 6:26 pmPosts: 14

Re: Taking balls in the order of the image in robotc for nxt

I already have solved the ball nº 1, now is taking all the balls from 1 to 2.If you see some words you don´t understand, is because they are in portuguese.

Next i will present some rules for the game:- the ball 1 and ball 2 goes to margin 2- the ball 1 must to margin 1- the ball 1 and ball 3 goes to margin 2- the ball 1 and ball 2 must return to margin 1- the ball 4 and ball 5 must to margin 2- the ball 4 must return to margin 1- the ball 4 and ball 6 must return to margin 2- the ball 6 must return to margin 1- the ball 4 must return to margin 1- the ball 4 and ball 6 goes to margin 2- the ball 6 goes to margin 1- the ball 6 and ball 7 must go to margin 2- the ball 1 and ball 2 goes to margin 1- the ball 1 and ball 8 goes to margin 2- the ball 1 must return to margin 1- the ball 1 and ball 2 goes to margin 2

End of game

Last edited by lololol on Fri Jan 30, 2009 7:52 pm, edited 4 times in total.

////////////////////////////////////////////////////////////////////// main //////////////////////////////////////////////////////////////////////task main(){moveFrente();wait1Msec(1000);fechaGarra();wait1Msec(1000);moveTras();wait1Msec(1000);viraEsquerda();wait1Msec(1000);moveFrente();wait1Msec(1000);abreGarra();wait1Msec(750);PlaySound(soundUpwardTones);//listen a sound in the endwait1Msec(1000);}

From here you can do the rest to all the balls, following the rules. But be careful, this is not Arfificial Inteligence.In Arfificial Inteligence you have to have a robot reconizing you´re environement. To do that you have to create an Algorithm or something else, example:- Table Agent in a array- A* Algorithm- DepthFirstSearch- DepthLimitedSearch- ...

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum