Let's Make Robots!

My first blog entry and first robot

Hello LMR. I am pretty new to the site. I used to lurk around here just because I liked the videos of robots, but eventually it sucked me in. I made a start here bot but wrote my own code which I am still working on. I am pretty good with coding and am looking forward to doing more advanced stuff. My camera is broken ATM but I'm going to borrow someones camera to make a page in the robot section with pictures and video.

For now though I'll give you guys the code I wrote in case anyone is interested. I can add descriptions if anyone wants but it's pretty self explanitory.

pause 3000 
servo 0, 150

symbol dangerlevel = 100
symbol turn = 1520
symbol servo_turn = 500
symbol bored = 250

main:
readadc 0, b1
if b1 > dangerlevel then gosub danger
if b1 < dangerlevel then gosub safe
goto main

danger:
gosub stp
gosub check
if b3 > b2 then gosub rturn
if b2 > b3 then gosub lturn
pause turn
gosub fwd
return

safe:
inc b4
gosub fwd
if b4 > bored then gosub explore
return

explore:
gosub check
if b3 > b2 then gosub slturn
if b2 > b3 then gosub srturn
pause 1000
gosub fwd
let b4 = 1
return

check:
servo 0, 200
pause servo_turn
readadc 0, b2
servo 0, 100
pause servo_turn
readadc 0, b3
servo 0, 150
return

fwd:
high 4
low 5
high 7
low 6
return

bkwd:
high 5
low 4
high 6
low 7
pause 2000
return

lturn:
high 4
low 5
high 6
low 7
return

slturn:
high 4
low 5
low 6
low 7
return

rturn:
high 5
low 4
high 7
low 6
return

srturn:
low 4
low 5
low 6
high 7
return


stp:
low 5
low 4
low 7
low 6
return