Description
This Laser Non-modulator Tub Sensor Receiving Module Laser output High Level is a sensor for Raspberry Pi and Arduino to receive the laser output and decode it digital data. At Input, the module Receive laser signal when output high level; Does not receive laser signal when output low level. On detecting a laser signal, output goes at a high level (5V) until the laser signal is there.
Test Circuit
In this example, we are going to use Arduino Uno to test our module. Note that you can also use and other type of Arduino or Raspberry pi.
Hardware required
- Arduino Uno
- Buzzer
- LED
- Laser Sensor Module
- KY-008 Laser Transmitter Module
- 220 Ohm resistor
Circuit
Testing codes
//www.faranux.com #define laser 2 #define sensor 3 #define LED 4 #define buzzer 5 void setup() { Serial.begin(9600); pinMode(laser, OUTPUT); pinMode(sensor, INPUT); pinMode(LED, OUTPUT); pinMode(buzzer, OUTPUT); digitalWrite(laser, HIGH); } void loop() { bool value = digitalRead(sensor); if (value == 0) { digitalWrite(LED, HIGH); digitalWrite(buzzer, LOW); } else { digitalWrite(LED, LOW); digitalWrite(buzzer, HIGH); } }
After uploading the code, you will point the laser light to the sensor and the LED will go LOW and the buzzer sounds. When the light is not pointing to the center of the sensor, it will be vice versa; LED goes HIGH and Buzzer stop sounding.
Package includes: 1×Laser Sensor Module