Let's Make Robots!

BotKropny, the ugly light-seeking robot

TotoroYamada's picture
seeks light, is ugly
Cost to build: 
$50
Time to build: 
3 hours
AttachmentSize
BotKropny.bas2.42 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

well i thing is pretty sure that robot's chracter is pretty cool!!

LED up!!!!

and one doesnot need to code to implement this easy robot!!

and that's for sure!! 

code please
jklug80's picture
what would you do with it? If you are new to robotics learn from making things yourself. Starting with code and trying to understand it or build a robot to match code doesn't work.

i have a sample code for SRF05 , i was just wondering if i have to use the same PULSOUT and PULSIN commands

 

here is my code :please comment !!

 

Symbol dangerlevel = 50 ' 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
symbol trig = 3 ‘ Define output pin for Trigger pulse
symbol echo = 6 ‘ Define input pin for Echo pulse
symbol range = w1 ‘ 16 bit word variable for range

main: ' the main loop
pulsout trig,2 ‘ produce 20uS trigger pulse (must be minimum of 10uS)
pulsin echo,1,range ‘ measures the range in 10uS steps
pause 100
let range = range * 10 / 58 ‘ multiply by 10 then divide by 58
readadc range, b1
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
goto main

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
gosub totalhalt
readadc range, b1
'Look the other way:
gosub rturn ' look to another side
pause servo_turn ' wait for the servo to be finished turning
gosub totalhalt
readadc range, b2

' 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

Ajster's picture
You ought to post your own questions in the forums, not on other peoples pages, unless it relates to the page in question, which this doesn't really.
Rudolph's picture

LOL. How many times have you (and others) had to say that lately? What's with the plethora of people showing up and posting "code please" lately? It's friggin  ridiculous.

To top it all off, this project has the code posted already, firdouse. Right there at the top, right under the first photo, "BotKropny.bas 2.42 KB".

oops sorry i didnt notice that !
TotoroYamada's picture

No i assure you, he's ugly! But that doesn't mean i dont like it... ^^

"Hot glue is cooler than Blue masking tape."

After PC Vs Mac, Arduino Vs Picaxe, VB Vs Perl, here comes Hot Glue Vs Blue Tape!  ;-)  I like (blue) tape for two reasons : you can unstick it very easily, and it gives the robot a unique look... But if i wanted to build something more permanent, i'll sure give it a try!

 "5 stars cuse my last name is yamada. Also i like the movie totoro."

Oh gosh, did i just find my evil twin?

iCon's picture
5 stars cuse my last name is yamada. Also i like the movie totoro.
OddBot's picture

There are no ugly robots on LMR. Some robots just have more character than others :)

 

mintvelt's picture
Not ugly at all. It has personality! Good show.
Gareth's picture

Yes the Leds are "Outstanding" big thumbs up - or should i say "Leds-up"

Video style is good for phone - at least you have made the effort to show it in action - although the start was a bit dark it recovered and brightened enough, for me it was a bit like a "boxer" entering with his arms (LEDs) up high already claiming victory.

nice one ------- anyway boxers dont need brains (picaxes) so dont feel guilty about donating to another bot LöL.

NB. Hot glue is cooler than Blue masking tape.

Mr.M's picture
Looks interesting. love the leds.
pcrsweetness's picture
I actually think the thing looks pretty cool with the blue tape! :)