Santiago MunozDaniel Law
Published

Lane Tech PCL - Particle Argon Laser Tripwire

An advanced state of the art Laser Tripwire using a Particle Argon.

BeginnerFull instructions provided309
Lane Tech PCL - Particle Argon Laser Tripwire

Things used in this project

Hardware components

Photon
Particle Photon
×1
LED (generic)
LED (generic)
×1
Photo resistor
Photo resistor
×1
Laser Emitter, Small Spot
Laser Emitter, Small Spot
×1
Jumper wires (generic)
Jumper wires (generic)
×10
Resistor 330 ohm
Resistor 330 ohm
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE
IFTTT

Story

Read more

Schematics

Breadboard Diagram

Code

Laser Tripwire Code

C/C++
Code to Run Laser Tripwire
int ledPin = D4;
int laser = D3;
int sensor = A0; //A0
int SensorReading = HIGH;

void setup() {

  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);
  pinMode(laser, OUTPUT);
  pinMode(sensor, INPUT);
  //Particle.variable("Alert", waterDet);
}

void loop() {
  int sensorValue = analogRead(sensor);
  digitalWrite(laser, HIGH);
  delay(200);
  //SensorReading = digitalRead(sensor);
 
  if (sensorValue <= 100){
      digitalWrite(ledPin, HIGH);
      delay(500);
      digitalWrite(ledPin, LOW);
      Particle.publish("Alert", "now");
  }
  
  else {
      digitalWrite(ledPin, LOW);
  }
  
  Serial.println("Analog Value :");
  Serial.println(sensorValue);  
  delay(250);

}

Credits

Santiago Munoz

Santiago Munoz

3 projects • 1 follower
Daniel Law

Daniel Law

18 projects • 7 followers
Teacher. Maker. Citizen of the planet.

Comments

Add projectSign up / Login