Wish List 0

Qre1113 Line Sensor Breakout Analog

Rs. 32.00 Rs. 39.00

Line Sensor Breakout - QRE1113 (Analog) - Proximity, Infrared Sensor Evaluation Board

          Key Features
          ? 5VDC operating voltage
          ? 25mA supply current
          ? Optimal sensing distance: 0.125"" (3mm)
          ? 0.30 x 0.55 "" (7.62 x 13.97 mm)

SPECIFICATIONS:

       -Phototransistor output 

       -No contact surface sensing 

       -Miniature package


OVERVIEW:

       -5VDC operating voltage

       -25mA supply current

       -Optimal sensing distance: 0.125" (3mm)

PACKAGE INCLUDES:

      1 PCS x Qre1113 Line Sensor Breakout Analog



//Code for the QRE1113 Digital board

//Outputs via the serial terminal - Lower numbers mean more reflected

//3000 or more means nothing was reflected.


int QRE1113_Pin = 2; //connected to digital 2


void setup(){

  Serial.begin(9600);

}


//SOURCE CODE TAKEN FROM BELOW LINK

//https://forum.arduino.cc/index.php?topic=431248.0

void loop(){


  int QRE_Value = readQD();

  Serial.println(QRE_Value);


}



int readQD(){

  //Returns value from the QRE1113

  //Lower numbers mean more refleacive

  //More than 3000 means nothing was reflected.

  pinMode( QRE1113_Pin, OUTPUT );

  digitalWrite( QRE1113_Pin, HIGH ); 

  delayMicroseconds(10);

  pinMode( QRE1113_Pin, INPUT );


  long time = micros();


  //time how long the input is HIGH, but quit after 3ms as nothing happens after that

  while (digitalRead(QRE1113_Pin) == HIGH && micros() - time < 3000);

  int diff = micros() - time;


  return diff;

}

15 days

Write a review

Please login or register to review