Name: library-beam-detector
Owner: Particle
Description: Laser break beam detector firmware library
Created: 2017-04-29 11:26:34.0
Updated: 2017-04-29 11:27:03.0
Pushed: 2018-01-03 18:31:41.0
Homepage: null
Size: 10
Language: C++
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A Particle firmware library for a laser break beam detector.
Connect the laser beam to an NPN transistor on an output pin, connect the photoresistor to a pull down resistor and an input pin.
lude "beam-detector.h"
t auto LIGHT_PIN = A0;
t auto LASER_PIN = D0;
Detector detector(LIGHT_PIN, LASER_PIN);
setup() {
tector.begin();
loop() {
(detector.beamBroken()) {
// do stuff
event count is in detector.detectionCount()
See the examples folder for more details.
Copyright 2017 Particle Industries
Licensed under the LGPL3 license