Ir break beam and Arduino
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- AlexMaven
- Posts: 2
- Joined: Sun Sep 11, 2022 7:09 pm
Ir break beam and Arduino
So I plan to combine two different sketches a stepper motor that rotates clockwise and counterclockwise when the ir break beam is broken. I figured first I need to figure out how to use the millis function because once the ir break beam is broken I want the sensor to be unbroken until 60,000 milliseconds. That's where I have a problem I don't know how to execute that , how to virtually turn off the sensor for 60 seconds. It currently works fine with the code given and is plugged into the the 3.3v power source on the arduino. Here's the code I'm using now https://learn.adafruit.com/ir-breakbeam-sensors/arduino
- adafruit_support_bill
- Posts: 88145
- Joined: Sat Feb 07, 2009 10:11 am
Re: Ir break beam and Arduino
This guide shows how to sweep a servo using millis for timing.
https://learn.adafruit.com/multi-taskin ... ino-part-1
https://learn.adafruit.com/multi-taskin ... ino-part-1
Please be positive and constructive with your questions and comments.