Pixy2 is out! …. And it does line vector recognition:
#include <Pixy2.h>
#define X_CENTER (pixy.frameWidth/2)
Pixy2 pixy;
int32_t pan;
void setup()
{
Serial.begin(115200);
Serial.print("Starting...\n");
pixy.init();
pixy.changeProg("line");
pixy.setLamp(1, 1);
}
void loop()
{
pixy.line.getAllFeatures();
pan = (int32_t)pixy.line.vectors->m_x1 - (int32_t)X_CENTER;
Serial.print("pan: ");Serial.println(pan);
}
…. Now just need it to stop raining outside so it can be tested on blue rope pinned down on vegetable beds.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.