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
  • Sensors with the micro:bit and MakeCode

Sensors with the micro:bit and MakeCode

QTI Line and Close-range Object Detection

The QTI is most often used as a robotic line sensor.  It shines infrared light, and if a surface within about 1/4-inch reflects that light the script will respond with a smaller value.  If the surface is black, it will absorb the light and respond with a larger value.

Parts

(1) QTI module 555-27401 
(1) 3-Pin Signal-Power-Ground Cable Extension (8″) 800-00080 (Optional)
(1) 3-Pin Single Row Header (long) (451-00303) (Optional)
(1) Resistor 220 Ω (red-red-brown-gold)
Jumper wires: Red, black

Schematic

Wiring

Script


Tests

The QTI is designed to face downwards close to either a black or white surface.  Make sure it is not facing a window with sun streaming in or any other bright source of light.

Use a sharpie to create a black 1×1 inch black square in the corner of a sheet of paper.

Face that 1×1 inch black square 1/4 of an inch from the parts side of the QTI and note the measurement.

Now, face a corner the surface of a corner of the same sheet that white, again at a distance of 1/4 inch.

The microsecond time measurement should be less than 1/4 of the previous measurement.


Printer-friendly version
Phototransistor Light (Extended Range)
Prev
FlexiForce Pressure Sensor
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress