<< return to Pixycam.com

Pixy Cam- line following-frc


#1

I am wondering how to use the pixy cam for FRC 2019-Deep Space. So we have the pixy and we want to use it as a line follow for vision tape. So we have programed the pixy to the vision tape so it so it see’s the tape as a vector. We are going to connect the camera to a raspberry pie. Instead of outputting the program to a video output we would like to output the vector as data information that is sent over network tables. When the pixy identifies the vector it would sent that data to the drive station. So then when the camera identifies a vector (vision tape) the driver would press a button to toggle the line following system where the robot would follow the line on the ground. I am wondering how to 1- change the code so it could output data (instead of video) and 2- convert the information- (vector) line information and move the robot straight on the line till the line ends. Also how do I take the data (vector data) and have the robot move? Please let me know how to resolve this issue.


#2

Hello Noah,
If you want to use Pixy2 with a Raspberry Pi, please see this guide:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_the_libpixyusb_example_on_linux

There is an example called GetLinesCPPDemo that shows how to get line data:

https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_the_libpixyusb_example_on_linux#line-identification-example-getlinescppdemo

Hope this helps!

Edward


#3

Thank you for you help!

Noah


#4

We also added LabVIEW Pixy2 support:

In case you’re interested in connecting Pixy2 directly to RoboRIO, running LabVIEW. We only support I2C currently.

David