Begginner robot Problems(yet again)

Alrite so I have my robot made (and hopefully the write way too) but when i go to do the first command in the "First robot how to" guide my computer tells me i need to hold the reset button and do PICAXE>run then let go of the reset button when i get a status bar to pop up. what deos it mean when it says "PICAXE>run?

I assume it means that there
I assume it means that there is a ‘PICAXE’ menu in your picaxe programming software, and that you should choose the menu item ‘run’ from that menu.

That menu deosnt have that

That menu deosnt have that option though. do you know if there might be a different problem?

 

ok i figured out how to

ok i figured out how to reset the PICAXE but how do i get a program to run on it all i want it to do is

servo 0, 150

wait 2

thats it

main:

servo 0 ,150

pause 2000 -or- wait 2

end -or- goto main

 

but how do i get my robot to
but how do i get my robot to do that once it is programmed. how do i get it to execute the program is what i trying to say lol.

When you have sent the

When you have sent the program to the Picaxe chip via the download cable, by pressing F5 on your computer, and the little “Success!” dialog box opens to let you know that the programming attempt was successfull, click OK, and you’re good to go.

When you power up the chip, which is hopefully attached to your robot, the program will start executing.

Actually, since the chip will already be powered, to allow programming to take place, the program will begin to execute as soon as a successful download has occured.

so if the program hasnt
so if the program hasnt started running by the time the success message pops up then i may have wired it wrong? alritey then back to the drawing board =). I <3 LMR!!!

The success message pops up

The success message pops up as soon as the download finishes. After a very brief wait your program should begin.

Perhaps try a few commands, to move the servo about a bit. If the servo is already centred and you send it ‘servo pin, 150’ you won’t see much action.:

Have a good look at the manual containing the commands. Manual 2, I think.

i sure will i am going to
i sure will i am going to make a robot page thing so you can see what im doing

i sure will i am going to
i sure will i am going to make a robot page thing so you can see what im doing

"Program"

The newer versions of the Picaxe Programming Editor calls it “Program” and it is illustrated with the image of a connector (jack). You also find it in the main menu under >Picaxe>program.

And F5 is my personal favourite.

Frits is in the process of rewriting the Start-Here tutorial. You might want to inform him about the changed button in the programmer. Just reply on that page.

And read the manual

For every bit of code that you “steal” from your LMR buddies, you should read the manual. Take Chris’ code for example.

main: ; this is called a label, find it in the manual

servo 0 ,150 ; find the command “servo” and while you are there, turn the page and read all about “servopos”

pause 2000 -or- wait 2 ; check out the difference between pause and wait, it’s not just the unit of measurement!

’ I just did read those pages myself :sunglasses: IT IS just the unit! I got confused with “sleep”. Look it up. Manuals are fun!

’ Ever tried to load a new program while your Picaxe was wait-ing for a long time?

end -or- goto main ; another new command to me: “end”, my programs never do. Now you have me reading that page Chris!

is there an updated version
is there an updated version of the begginner bot code or something? my computer keeps telling me i have a sytax error and i dont kno what it means. all i did was copy and paste in the code like the walk through said can u help a brotha out? if theres an updated version could u post a link or just post the code? it would be much appreciated =).

No new version of code

Picaxe Basic has remained the same. I just ran a syntax check on Frits’ code in Picaxe editor v 5.2.7 (use F4). And it all checks out.

Syntax errors always tell you where in the code the error is. Copy/paste that message (it’s just text, please no screendumps) here, if you can’t figure it out yourself.

BTW: the lines
+++
are not part of the code! Frits put them in there to mark beginning and end.

all i did was copy and paste

all i did was copy and paste it into the programming editor straight from the begginner bot manuel (and no i didnt paste in the plus signs) and it tells me i have syntax errors everywhere. basically everytime the code says "gosub" theres a syntax error. am i supposed to delete the text that tells me what each line of code does or no?

 

show us
Please cut and paste the code you are using here as a comment so we can see what you are doing. Paste here exactly what you pasted in the editor.

i just copy and paste as the

i just copy and paste as the manuel tells me too like so:

Symbol dangerlevel = 70 ’ how far away should thing be, before we react?
symbol turn = 300 ’ this sets how much should be turned
symbol servo_turn = 700 ’ This sets for how long time we should wait for the servo to turn (depending on it´s speed) before we measure distance

main: ’ the main loop
readadc 1, b1 ’ read how much distance ahead
if b1 < dangerlevel then
gosub nodanger ’ if nothing ahead, drive forward
else
gosub whichway ’ if obstacle ahead then decide which way is better
end if
goto main ’ this ends the loop, the rest are only sub-routines


nodanger:’ this should be your combination to make the robot drive forward, these you most likely need to adjust to fit the way you have wired your robots motors
high 5 : high 6 : low 4 : low 7
return


whichway:
gosub totalhalt ’ first stop!

‘Look one way:
gosub lturn ’ look to one side
pause servo_turn ’ wait for the servo to be finished turning
readadc 1, b1
gosub totalhalt


’Look the other way:
gosub rturn ’ look to another side
pause servo_turn ’ wait for the servo to be finished turning
readadc 1, b2
gosub totalhalt

’ Decide which is the better way:
if b1<b2 then
gosub body_lturn
else
gosub body_rturn
end if
return

body_lturn:
high 6 : low 5 : low 7 : high 4 ’ this should be your combination that turns the robot one way
pause turn : gosub totalhalt
return

body_rturn:
high 5 : low 6 : low 4 : high 7 ’ this should be your combination that turns the robot the other way
pause turn : gosub totalhalt
return

rturn:
servo 0, 100 ’ look to one side
return

lturn:
servo 0, 200 ’ look to the other side
return

totalhalt:
low 4 : low 5 : low 6 : low 7 ’ low on all 4 halts the robot!
Servo 0,150 ’ face forward
wait 1 ’ freeze all for one second
return

Syntax check successful! Memory used = 142 bytes out of 4096

My editor says:

"Syntax check successful!
Memory used = 142 bytes out of 4096"

Please check >Help >About and tell us what version of the editor you are using.

Mine says "Version 5.2.7 (Syntax DLL 262144)"

My editor says its "Version
My editor says its "Version 5.2.9 (Sytax DLL 262144) so do i need an upgrade or something?