loading
 
Robot Soccer
Aditya Patil from India  [3 posts]
7 years
m Having a single robot , a ball and a goal post in an arena.
Camera is mounted on the top which gives the live feed to the roborealm,the module s in the software are inserted except for the few module s like Calculate Distance and Parallel Port module i m having problems so as how to provide output on parallel port through roborealm using module parallel port.
I hav written a VBscript please check it out and what shuld be the parameters given to the parallel port which willl control the motion of the robot to procure the ball n score a goal.
pls reply URGENT.
attached below is .robo file.
program.robo
Anonymous from United Kingdom  [99 posts] 7 years
What is the protocol you are using to control your robot from the parallel port? There are 8 data bits on the PP protocol.  Each of these can be mapped to a variable from your program.  I would think in terms of getting a simple controller working that would set orientation and forward / backward from the camera and then pass these to the parallel port.  I could imagine a simple implementation where you had one digital line in for the left motor, another for the right motor and and a third for "kick".  

Take a look at the excellent documentation on the RR parallel port and try to break your problem into small pieces.

good luck!
mmason
Aditya Patil from India  [3 posts] 7 years
hi,

m going to use a TRI coder to decode through ASK receiver and then a ATmega32 n den L293D to drive four motors
two motors for locomotion of robot n 2 fro grabber mechanism which will grab the ball when it reaches the ball.
please correct n give me the correct .robo program as in the parallel port output what i should get as i have variables in my VBscript!
Anonymous 7 years
Aditya,

It seems that your robofile is not quite in order. There are several Parallel port modules and Calculate_Distance modules that do not appear to be configured in any way. Perhaps you can try cleaning up the module before we can even attempt to understand it. Note that you also have a lot of VBScript which is not very well formatted and difficult to understand. Perhaps you can try to explain what the VBScript is supposed to do.

As Prof Mason mentions have a look at the docs for the Parallel port. That's the easiest part as you are just mapping each bit of the port to a variable. So for example, if you wanted to kick you would use

SetVariable "kick",1

in VBScript and type the variable kick into one of the parallel port lines, say Pin #2. Your MCU would then interpret a high signal on pin #2 using its DIO or Analog IO (depends on your MCU) to know that it is supposed to kick. From there on it is logic within your MCU that moves the motors, etc. to actually perform a kick.

Start simple, reduce your script to just want is needed to get the simplest thing to work. Once that is accomplished use what you have learned to increase the complexity!

STeven.
Aditya Patil from India  [3 posts] 7 years
thank u everyone,

i have changed my program as in accordingly gave the variables in Calculate Distance module and Parallel Port module

Attached alongwith is the new .robo file pls check out will it work :)
program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index