Files
Scanning the repository...
Last update 6 years 8 months
by Emanuele Giacomini
FilesrefTUTTO PIXYexamplesline_get_all | |
---|---|
.. | |
line_get_all.ino |
line_get_all.ino#include <Pixy2.h> Pixy2 pixy; void setup() { Serial.begin(115200); Serial.print("Starting...\n"); // we need to initialize the pixy object pixy.init(); // Change to line tracking program pixy.changeProg("line"); } void loop() { int8_t i; char buf[128]; pixy.line.getAllFeatures(); // print all vectors for (i=0; i<pixy.line.numVectors; i++) { sprintf(buf, "line %d: ", i); Serial.print(buf); pixy.line.vectors[i].print(); } // print all intersections for (i=0; i<pixy.line.numIntersections; i++) { sprintf(buf, "intersection %d: ", i); Serial.print(buf); pixy.line.intersections[i].print(); } // print all barcodes for (i=0; i<pixy.line.numBarcodes; i++) { sprintf(buf, "barcode %d: ", i); Serial.print(buf); pixy.line.barcodes[i].print(); } }