Ks0121 keyestudio EASY plug Photo Interrupter Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
(Created page with "==EASY plug Photo Interrupter Module == <br>500px|frameless|thumb<br> ==Introduction== Upright part of this sensor is an infrared emitter and on the oth...")
 
No edit summary
Line 44: Line 44:
}
}
</pre>
</pre>
==Resources ==
'''Datasheet'''
http://www.keyestudio.com/files/index/download/id/1464155645/
==Buy from ==
http://www.keyestudio.com/keyestudio-easy-plug-photo-interrupter-module-for-arduino.html


[[category:Module]]
[[category:Module]]

Revision as of 10:07, 16 February 2017

EASY plug Photo Interrupter Module


thumb

Introduction

Upright part of this sensor is an infrared emitter and on the other side, it’s a shielded infrared detector. By emitting a beam of infrared light from one end to another end, the sensor can detect an object when it passes through the beam. It is used for many applications including optical limit switches, pellet dispensing, general object detection, etc.
Note: this module needs to be used together with EASY plug control board.


Specification

  • Interface: Easy plug
  • Supply Voltage: 3.3V to 5V
  • Interface: Digital
  • Size: 38x20mm
  • Weight: 5g


Connection Diagram


thumb


Sample Code

// photo interrupter module
 
int Led = 13 ;// define LED Interface
int buttonpin = 3; // define the photo interrupter sensor interface
int val ;// define numeric variables val
void setup ()
{
  pinMode (Led, OUTPUT) ;// define LED as output interface
  pinMode (buttonpin, INPUT) ;// define the photo interrupter sensor output interface   
}
void loop ()
{
  val = digitalRead (buttonpin) ;// digital interface will be assigned a value of 3 to read val
  if (val == HIGH) // When the light sensor detects a signal is interrupted, LED flashes
  {
    digitalWrite (Led, HIGH);
  }
  else
  {
    digitalWrite (Led, LOW);
  }
}

Resources

Datasheet

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

Buy from

http://www.keyestudio.com/keyestudio-easy-plug-photo-interrupter-module-for-arduino.html