Reading different colors with arduino

Added by Raxius Bloom over 2 years ago

I'm currently working on a project where I want my arduino program to do different things depending on the color signature pixy detects.

My program right now is adapted from the "hello world" example and uses the "pixy.blocks[j].x" and "pixy.blocks[j].y" variables mapped to degrees to determine how to move the servos.

What's the simplest way to change the program so it can react differently to different signatures. In essence changing the "if (blocks)" line in the example to "if (red blocks)" or "if (blue blocks)". A simple example of this application could be turning on different leds for different signatures detected.


Replies (1)

RE: Reading different colors with arduino - Added by Raxius Bloom over 2 years ago

Nevermind! I just discovered the variable "pixy.blocks[j].signature" through a little experimentation.

(1-1/1)