<< return to Pixycam.com

Pause pixycam with arduino

Hello everyone,

this is my first post on this forum so please correct me if there is anything wrong.
So what I’m trying to do is to turn the pixycam on and off in the Arduino IDE. I’m using an ultrasonic sensor and the Pixycam to track a line and when an object is detected in it’s path, then the Pixycam should be turned off, because otherwise the line tracking program will interfere with the code that avoids the obstacle.

So my question is if there is a command that I can use with Arduino to turn the pixycam on and off?

Thanks in advance!

Hi,

there’s no code to turn Pixy off…the easiest way to do this is probably to just switch programs on Pixy. Like this:

pixy.changeProg("video");

When you want to switch back to the line following program, do this:

pixy.changeProg("line");

Hope this works for you! If not, just write some code to ignore Pixy’s output whenever the ultrasonic sensor gets triggered.

Cheers,
Jesse