Log in

View Full Version : What is the first step for programming?


sjung9442
22-01-2006, 19:25
Our programmers are all first year students. And our programming mentor is "Out of country" so, we can't do anyting right now.
What is the first step for programming? We have to do someting before our mentor gets back from the trip, but we are not sure.
Which part of program do we have to look at? And where should we start?
We played with camera little bit, but that is all we did so far.

TubaMorg
22-01-2006, 19:33
Our programmers are all first year students. And our programming mentor is "Out of country" so, we can't do anyting right now.
What is the first step for programming? We have to do someting before our mentor gets back from the trip, but we are not sure.
Which part of program do we have to look at? And where should we start?
We played with camera little bit, but that is all we did so far.

Whoa it's tough if you don't have any programmers there to help. Is your robot built enough to drive yet?

I would strongly suggest using EasyC to build your code. In the Help section are tutorials. Walk yourselves through those and see how your robot behaves. Most importantly, if you are testing your code on the robot, make sure you have it up on blocks so that the drive wheels aren't in contact with anything. A 100 pound out of control robot can be dangerous! Take small steps and see how your robot reacts to each change. Trying to get it all programmed at once won't work. If your bot isn't ready to go yet, just run through the tutorials to at least get yourself acquainted with EasyC, skipping the parts that instruct you to compile and download.

pwilczynski
22-01-2006, 19:49
If you have the resources, you might want to try and set up a motor board with maybe three motors, speed controllers, robot controller, battery, backup battery, sensors and maybe a servo. By using this instead of a robot you will be able to test all of your code before the robot is built and move very slowly through the process without havingyour build team hanging over your backs and trying to build stuff.
As for software, I would also go with EasyC, at least for the start. If you want to dive into the more complicated stuff, the default code is already programmed for two joystick control and certain other buttons doing other things. If you have any questions or comments, just post them. I'm sure you will get plenty of support.

scitobor 617
22-01-2006, 20:25
As a pre-EasyC and mentorless programmer I would advise you to try jumping into C and the default code first. I would suggest reading a C tutorial(heres a good one (http://cplus.about.com/od/beginnerctutoria1/l/aa010602a.htm) ) then read the 2004 programming reference guide (http://www.ifirobotics.com/docs/legacy/2004-programming-reference-guide-12-apr-2004.pdf). If you have never programmed before this may be a difficult course but I believe it will provide you with greater understanding. Whatever development route you take, I would suggest trying to setup a test board, as previously stated, and/or try reprogramming an old robot(if you have any).

Ryan M.
22-01-2006, 20:47
One way to start is to think about what your robot does and figure out what the various outputs (motors, servos, pneumatics, etc.) and inputs you have. From there, build a list of things which you want to do code-wise, and put it in order of priority. For instance, our team this year might have a list which looks something like:

Drive
Automatically track goal using turret
Auto-range finding
Autonomous


After you have a list which includes the major things you plan on doing, break the highest priority one down into smaller, easier to manage parts and implement those in order. Going off of my example, here's what you might have for "Drive:"

Simple 1-to-1 joystick-to-drive train mapping
Encoder tracking
PID controller


Once you get basic driving working, you can begin to move on to something which may be less critical, but still important. If you have multiple people, you can multitask, by having one person work on one subsystem, someone else on another, etc.

Basically, the easiest way to approach writing code for your robot (or any computer), is to break it down into easily manageable pieces which you stick together to make your more complex system.

Tom Bottiglieri
22-01-2006, 21:23
These taught me the default code back in 2004, and I see no reason why they shouldn't do the same for you.

http://team195.com/documents/FIRST_C_2004_Full_Presentation/

(Look through them in order. Don't just skim them. Hit the play button (F5) and listen to the voice over. It really helps to hear it and see it.)

sjung9442
22-01-2006, 21:54
Thank you all of you for what you have done.
I guess we have to work on drive control first. Motors and speed controllers.
I will look on Easy C little bit more. I liked the program but did not know how to use it. If there is a tutorial, I will try to use that to learn how to use that program. We may be first year programmers in FIRST Robtics, we are good programmers, so I think we will be fine. We just needed some first step guide. Thank you again to you all.