View Full Version : Learning SPIN for the propeller board.
03-19-2009, 08:16 AM
I am designing a robot prototype as a college project, which is very very similar in drive train characteristics as the QuadRover. After a lot of searching I found the propeller board. And recently, finally got my hands on one :-D
I had a person who originally said he could program the bot for me, and I did some research myself, and after finding that the prop uses the proprietary SPIN code language, I asked him to make sure he could write that code as well. After I sent him to the site and asked him to look into it, he assured me, he can / could.
Turns out he cant, gave up, and has zero desire to learn it.
Since I'm a, "If you want it done right, do it yourself" kind of person I would like to:
A-Get my bot running as my deadline for it is nearing incredibly fast
B-Learn the code myself as to debug, change, and add code as needed
So I come to the community of Parallax users, programmers, and creators asking for some guidance.
-What is my best way to learn SPIN?
-Is there any working program for a QuadRover that I can download? and modify for my application? (As the only real difference with the way my bot drives itself is a lack of brakes, and some other minute differences.)
Also wanted to chime in that within the last week I have been researching the parallax products I have been pretty impressed with the selection of hardware, software, and support that comes with the product!
Thanks for the help in advance everyone!
Really excited to learn this code and get my bot going!
Take a look at the Propeller Manual and the Propeller Education Labs. They're both available for free download from the resources tab. Also, take a look at the stickies at the top of the forum.
03-19-2009, 09:09 AM
I could make a general suggestion to start with the PE-Kit labs about learning SPIN.
But as you mentioned that your deadline comes up fast I want to suggest something else:
Post the details about how your robot should be controlled. Me and surely some other forummembers will give you guidance
especially designed to YOUR program.
Do you have some experience in ANY program language ?
Do you have some experience in ANY microcontrollers ?
What is YOUR backround about hobbies ? (mechanics? RC-Cars ? electronics ?
or just fascinated about robots but no experience with anything mentioned above?
Are you designing the robot alone or in a team?
How much time is left until presentation of the finished project ?
How far has your design-process proceeded ?
what kind of sensors to get information about the environment ?
what kind of link to send commands to the robot and receive status information from the robot ?
what should the robot autonomiously do ?
simply following a white line ?
driving curves around objects to avoid bumbing into these objects ?
simply driving down a commanded route on a plain street?
or the other end: winning the 1 million dollar competetion of the US-Army for all-terrain-robot-vehicles?
03-20-2009, 09:30 AM
Thanks SLRM, I have been doing a lot of reading on the Propeller Labs guide and im really liking it, I did forget to pick up a PropPlug and ordered one today so i can start doing some of the exercises in it. I really like the guide a lot and would REALLY suggest it to any beginners. Kudos to whomever wrote that guide as its pretty easy to follow, and informative.
A-I have learned a lot of web-programming over time. HTML, PHP, MySQL, Java, etc..but never any ladder logic. I had the chance to learn C a while back and regret not picking it up.
B-No experiences in microcontrollers, to be honest
C-I have been big into RC for about 10 years now, im a die hard T-MAXX fan, as well have even worked at a hobby shop for a while. My heart-set is robotics, and mechanical engineering however. My goal with school is to get into the field of designing tactical robotics.
D-The robot is solely my project right now, im confident i can handle the project alone, except for the programming, hence, I'm here.
E-Project must be completed by the end of the semester.
F-I have the robot designed, except for the arm that will be going on top of it, I have it drawn out, just need to get it into my CADD software. I am almost done with making all of the jigs for the chassis so i can bring it to be welded, nailing down the manufacture process for the track links since I have to make appx 350 of them, accurately. Overall, the thing holding me back is what drive motors i am going to go with (which at this point is dependent on the vendors I am using having what I need, and in my price range), and the controller.
G-I'm looking to use video at first, and move to video/gps for the bot to get its bearings in the world.
H-At first I plan on using a radio control RX/TX to control the bot, but eventually I would like to get it to be something like a video game on my pc, where I could in theory sit on my laptop, plug in my joysick to my laptop, and control the bot wireless
I-Right now autonomous, not much, not yet, I want to get it running properly before i get any autonomous activity. But in the future, i would like to be able to sense where and object is, be able to pick it up with its arm, and put it in its payload area.
Sorry for the lengthy post.
03-20-2009, 02:08 PM
me personally I like it if postings are long and really informative.
go on posting informative like this. If somebody don't want to read text he can take a look at the amount of lines and decide to move to a "short" posting
Now I have a picture of what you plan to do
So starting point could be establishing a wireless serial connection and how to send commands and receive status information
I recommend using the FullDuplexSerial-object or the Extended_FDSerial-object for serial connections
in my opinion the simple-serial object is so simple that things get compliceted very quick if you want to to more then
sending a few bytes
The question about the motor is worth a own posting in the sandbox as it is not strictly propeller-related
other things depend strongly on your motor / motors and 3 or 4 wheels
with two motors you can drive left/right by different speeds of the motors
with one motor you have to have som emind of steering-system
this could be driven by servos as there exists an object which allows to control up to 32 servos
with standard servosignal-pulses
03-21-2009, 01:10 AM
The vehicle is track based. It will have two 24vdc electric drive motors. These will be controlled with two IFI Robotics motor controllers