Ks0120 keyestudio EASY plug Infrared Obstacle Avoidance Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
(Created page with "==EASY plug Infrared obstacle avoidance sensor== <br>500px|frameless|thumb<br> ==Introduction== Infrared obstacle avoidance sensor is equipped with dist...")
 
No edit summary
Line 44: Line 44:
</pre>
</pre>


==Resources ==
'''Datasheet'''
http://www.keyestudio.com/files/index/download/id/1464155158/
==Buy from ==
http://www.keyestudio.com/keyestudio-easy-plug-infrared-obstacle-avoidance-sensor-module-for-arduino-starter.html
[[category:Module]]
[[category:Module]]

Revision as of 10:04, 16 February 2017

EASY plug Infrared obstacle avoidance sensor


thumb

Introduction

Infrared obstacle avoidance sensor is equipped with distance adjustment function and is especially designed for wheeled robots. This sensor has strong adaptability to ambient light and is of high precision. It has a pair of infrared transmitting and receiving tube. When infrared ray launched by the transmitting tube encounters an obstacle (its reflector), the infrared ray is reflected to the receiving tube, and the indicator will light up. A robot mounted with the sensor can sense changes in the environment.
Note: this module needs to be used together with EASY plug control board.


Specification

  • Interface: Easy plug
  • Working voltage: DC 3.3V-5V
  • Working current: ≥20mA
  • Working temperature: -10℃—+50℃
  • Detection distance: 2-1000px
  • Output signal: TTL voltage
  • Effective Angle: 35°
  • Size: 51*16.5mm
  • Weight: 7g


Connection Diagram


thumb


Sample Code

const int sensorPin = 3;     // the number of the sensor pin
const int ledPin =  13;      // the number of the LED pin
int sensorState = 0;         // variable for reading the sensor status
void setup() {
  pinMode(ledPin, OUTPUT);      
  pinMode(sensorPin, INPUT); }
void loop(){
  // read the state of the sensor value:
  sensorState = digitalRead(sensorPin);
  // if it is, the sensorState is HIGH:
  if (sensorState == HIGH) {     
     digitalWrite(ledPin, HIGH);  
  } 
  else {
       digitalWrite(ledPin, LOW); 
  }}

Resources

Datasheet

http://www.keyestudio.com/files/index/download/id/1464155158/

Buy from

http://www.keyestudio.com/keyestudio-easy-plug-infrared-obstacle-avoidance-sensor-module-for-arduino-starter.html