background image

Copyright © Parallax Inc.   

 

Page 5 of 6 

 
  _clkmode = xtal1 + pll16x 
  _xinfreq = 5_000_000 
 
VAR 
 
  long RCValue 
 
PUB Go 
 
  debug.start(31, 30, 0, 115200)  
  RCValue := 0 
 
  repeat 
    rc.rctime(0, 1, @RCValue)      ' Get RC value on 0 
    debug.dec(RCValue / 100)         ' Display results 
    debug.tx(13) 
    WaitCnt(ClkFreq / 4 + Cnt)     ' Delay 250ms, repeat 

Note: 

This program uses the FullDuplexSerial object library, which is included with the 

Propeller Tool software download. To view the results of the demonstration, after uploading is 
complete run the Parallax Serial Terminal from the Run menu, or press F12. Momentarily 
depress the Reset button on the Propeller QuickStart board to restart the program. Depending on 
surface reflectivity, values will range from about 3 to 2000. 

 

Arduino Uno 

 

void setup() { 
  Serial.begin(9600); 

 
void loop() { 
  Serial.println(RCTime(2)); 

    // Connect to pin 2, display results 

  delay(250);   

 

    // Wait 250 ms 

Summary of Contents for 555-27401

Page 1: ...e connected to a digital I O pin The QTI Sensor uses an infrared light emitting diode and infrared phototransistor to provide simple but effective non contact detection of patterns and objects In either case light emitted by the LED bounces off a surface or object and is detected by the phototransistor For pattern detection the sensor can differentiate between light and dark surfaces such as a bla...

Page 2: ...frared light is reflecting off a nearby surface Parts List QTI Sensor BASIC Stamp HomeWork Board Propeller BOE Propeller QuickStart or Arduino Uno microcontroller solderless breadboard as needed 22 gauge solid conductor hookup wire Basic Wiring Power requirements 3 3 to 5 VDC Communication Analog output of capacitor decay time depending on level of infrared reflectivity Dimensions 1 25 x 0 37 in 3...

Page 3: ...e surface Or for object detection the farther the sensor is to the object The range of values depends on the microcontroller due to how the microcontroller measures the capacitor transfer decay time but is typically about 30 to 2000 The range will also depend on the reflectivity of the object Some objects like the black antistatic foam used to protect electronic circuit boards reflect little or no...

Page 4: ...alue Display Display value DEBUG HOME DEBUG CR DEBUG DEC Duration CLREOL PAUSE 250 Wait 250 ms repeat GOTO Read_Sensor Note When this program is run the BASIC Stamp Debug Terminal will automatically open Note Depending on surface reflectivity values will range from about 60 to 3400 Propeller BOE and Propeller QuickStart Propeller BOE Wiring Diagram Propeller QuickStart Wiring Diagram OBJ debug Ful...

Page 5: ...xSerial object library which is included with the Propeller Tool software download To view the results of the demonstration after uploading is complete run the Parallax Serial Terminal from the Run menu or press F12 Momentarily depress the Reset button on the Propeller QuickStart board to restart the program Depending on surface reflectivity values will range from about 3 to 2000 Arduino Uno void ...

Page 6: ...his displays the Serial Monitor window Momentarily depress the Reset button on the Arduino board to restart the sketch Note Depending on surface reflectivity values will range from about 40 to 1300 For More Information Visit the full documentation for the QTI Sensor 555 27401 available from its product page The QTI Line Follower AppKit 28108 contains four QTI sensors plus mounting hardware to atta...

Reviews: