Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Infrared Light Navigation for the cyber:bot

Infrared Light Navigation for the cyber:bot

Simulate a Drop-off with Poster Board

Simulate a Drop-Off with Poster Board

A sheet of white poster board with a border made of electrical tape or black tempera paint makes for a handy way to simulate the drop-off presented by a table edge, with much less risk to your cyber:bot.

  • Use the micro:bit Python Editor to open IR_interference_sniffer, then click Send to micro:bit.
  • Set the cyber:bot board’s PWR switch to position 1, and use it make sure that nearby fluorescent lighting or other devices will not interfere with your cyber:bot’s IR object detectors.
  • Make a test patch of your black paint or electrical tape (at least 6 in x 6 in) on a piece of paper or cardboard.
  • Use the micro:bit Python Editor to open test_both_IR_indicators, then click Send to micro:bit.
  • Position the cyber:bot so that its IR detectors are “looking” at the test patch.  
  • While the cyber:bot is running test_both_IR_indicators, verify that that the infrared object detectors cannot see a reflection from it.
  • Also position the cyber:bot so that it is looking at the poster board surface, and make sure the infrared detectors can see that surface.   
  • Build a course similar to the one shown above.  For electrical tape, use at least three, preferably four, strips, edge to edge on the poster board with no paper visible between the strips, and make diagonals over the corners.  For paint, make a stripe at least 4 inches wide.
  • Use the script test_both_IR_indicators again to make sure that the cyber:bot detects the poster board but does not detect the electrical tape or paint.
#test_both_IR_indicators

from cyberbot import *

bot(22).tone(3000, 1000)

while True:
    irL = bot(14, 13).ir_detect(37500)
    irR = bot(1, 2).ir_detect(37500)
    bot(20).write_digital(irL)
    bot(21).write_digital(irR)

If the cyber:bot still “sees” the electrical tape too clearly:

  • Try adjusting the IR receivers (but not the IR LEDs) downward at shallower angles, looking straight ahead, or even slightly upward.  One of these angles will usually make it nearsignted enough to not see the electrical tape/paint, but not so nearsighted that it would miss the poster board surface.  

If the IR still isn’t nearsighted enough, here are more ways to make it more nearsighted.

  • Adjust the ir_detect command with different frequency arguments.  These will make the cyber:bot more nearsighted: 39000, 40000, 41000.
  • Try replacing the 2 kΩ resistors with 4.7 kΩ (yellow-violet-red) resistors to make the cyber:bot more nearsighted.
  • If all else fails, try a different brand of vinyl electrical tape.

If you are using older IR LEDs, the cyber:bot might actually be having problems with being too nearsighted.  Here are some remedies that will make it more far sighted:

  • Try pointing the IR LEDs and detectors downward at a steeper angle so that the cyber:bot is looking at the surface right in front of it.
  • Try replacing the 2 kΩ (red-black-red) resistors with 1 kΩ (red-black-brown) or even 470 Ω (yellow-violet-brown) resistors in series with the IR LEDs instead of 2 kΩ.

Printer-friendly version
Drop-off Detector
Prev
Avoid Drop-offs
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress