particle-iot/library-beam-detector

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Beam Detector

A Particle firmware library for a laser break beam detector.

Usage

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.

LICENSE

Copyright 2017 Particle Industries

Licensed under the LGPL3 license


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.