Read the manual! (A guide to newbies)
It seems we have a lot of newbies lately. This website is here to ask questions and get answers however, there seem to be a lot of questions popping up that sorta shouldn't be asked... Here's what I mean:
If you are new to electronics or robots or programming don't ask a question about step 487 when you know nothing of step 1, 2 or 3. Again, if you are new to this don't even think about motors or sensors etc. YOU NEED TO START WITH A BLINKING LED, period. Baby steps, folks!
Second: (And this drives a lot of people nuts) I would say about 80% of the questions asked around here are found IN THE MANUAL(S) If you are using a Picaxe (I'm sure there is simmilar help with other systems) there are 3 manuals available. In your Picaxe Programmer software, Under "Help" there are PDF's for getting started, BASIC commands and even how to hook everything up. Under that same menu there are also PDF's for just about every Picaxe modual they make. PLEASE, PLEASE, Read these manuals! Seriously, grab a beer and just read them --Under interfacing circuts there are pictures on how to hook things up and chunks of code to make them go. I still to this day, like to browse the BASIC Commands PDF and am still finding commands I didn't know about that seem to make my life easier.
Third: Break everything up! If you are trying to add a Sharp distance sensor to your bot, don't try to add the code into your main code. Instead write a seperate code including a debug command just to be sure the sensor is working and you can get an idea of the numbers it is spitting out. Next, write these numbers down on paper noting what variable number coresponds with what distance. You should do the same with your drive code: Write a seperate code including the commands you need for Fwd, Rev, SpinR and SpinL. LABEL EVERYTHING WELL WITHIN YOUR CODE TOO!! Now when you go to write your main code you have all these little snippits to go back to and you know they work. If nothing else, being able to cut and paste will keep you from having ot type too much. --As a point of reference, I have about 30-40 "sub-codes" I wrote to run Walter before I even thought of trying to put them together into one big code.