The world is made up of four elements: Earth, Air, Fire and Water. This is a fact well known even to Corporal Nobbs. It's also wrong. There's a fifth element, and generally it's called Surprise - Terry Pratchett, The Truth


Boe-Bot infrared eyes

Monday 30th June, 2008 | 11:51 am

The internet was off all weekend, made even more annoying by a) their customer service lines were also closed all weekend and b) it came back online first thing this morning meaning when they got into the office and saw the problem, a simple remote equipment reset or similar fixed it in a matter of seconds :( Still, least it’s working now. It gave me a chance to play with using IR detectors on the Boe-Bot to act as eyes for navigating which was pretty cool:

Boe-Bot IR

As opposed to using the wire ‘whiskers’ which have to physically touch an object before then backing up and moving away, and the light-sensitive photoresistors which weren’t really useful for navigating around objects at any great speed, using the IR sensors allowed it to continually send out pulses to detect objects and then react to them before they became an obstacle. This allowed much faster movement through a small maze (another USPS-sponsored event!):


Alt video for blocked YouTube access

I also set it up using basic code for a sumobot where it would lock onto an object and try to follow. Mia was not impressed! I was though, as it was able to successfully track a very fast moving dog :-D

    2 Responses to “Boe-Bot infrared eyes”


  1. Gravatar moon (1 comment)
    United States | Internet Explorer 6.0 | Windows XP
    October 24th, 2008 at 5:04 am

    that was imazing ..
    can you post the code please..??..

    best regards..

  2. Gravatar fouldsy (63 comments)
    United States | Mozilla Firefox 3.0.3 | Mac OS X
    October 24th, 2008 at 6:28 pm

    I think this was it. Basically right out the Parallax book (formatting isn’t too good in the comments section for code, sorry):

    ‘ Robotics with the Boe-Bot - FastIRRoaming.bs2
    ‘ Higher performance IR object detection assisted navigation

    ‘ {$STAMP BS2}
    ‘ {$PBASIC 2.5}

    ‘ Variables
    irDetectLeft VAR BIT
    irDetectRight VAR BIT
    pulseLeft VAR WORD
    pulseRight VAR WORD

    ‘ Signal program start/reset
    FREQOUT 4, 1000, 3000

    ‘ Main routine
    DO
    FREQOUT 8, 1, 38500
    irDetectLeft = IN9
    FREQOUT 2, 1, 38500
    irDetectRight = IN0

    IF (irDetectLeft = 0) AND (irDetectRight = 0) THEN
    pulseLeft = 650
    pulseRight = 650
    HIGH 1
    HIGH 10
    ELSEIF (irDetectLeft = 0) THEN
    pulseLeft = 850
    pulseRight = 850
    HIGH 10
    LOW 1
    ELSEIF (irDetectRight = 0) THEN
    pulseLeft = 650
    pulseRight = 650
    HIGH 1
    LOW 10
    ELSE
    pulseLeft = 823
    pulseRight = 650
    LOW 1
    LOW 10
    ENDIF

    PULSOUT 13,pulseLeft
    PULSOUT 12,pulseRight

    PAUSE 15

    LOOP

Leave a Reply


If you must, please use valid XHTML
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>