Ir break beam and Arduino

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
AlexMaven
 
Posts: 2
Joined: Sun Sep 11, 2022 7:09 pm

Ir break beam and Arduino

Post by AlexMaven »

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

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: Ir break beam and Arduino

Post by adafruit_support_bill »

This guide shows how to sweep a servo using millis for timing.
https://learn.adafruit.com/multi-taskin ... ino-part-1

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”