Hello.
First of all thank you for your great work… We use CMUCAM since CMUCAM1 and since then you rocks and pixy2 looks really great !
I’m working on a Mbed library for pixy2 for my studdents (after having made the UART communication for pixy). But I can’t get clear informations about many feature (and especially the line following features data).
As I don’t use arduino it’s quite hard to understood without any test.
I would like to know many things about pixy and pixy2. Let’s start with pixy2 :
In the line tracking section the “getMainFeatures”. I’ve understood that there are 3 kinds of objects : vectors, intersections and barcodes. But what does pixy2 return exactly for those objects ?
Looking at Pixy2Line.h, I can find struct objects :
- Vector are defined by 6 bytes : x0, Y0, x1, Y1, index and flag.
I understand the meaning of x and y but is there one for 0 and 1 ? I mean looking at your example in the line quickstart it looks like 0 is the nearest point and 1 the farthest. Am I true ?
What does index and flag stands for ? It’s unclear for me in the example… (is it usefull ?)
- Intersection are defined by 4 bytes : x, y, n and a reserved byte, and then a bunch of intesection lines defined by 2 bytes : index and reserved and a word : angle.
Looking at the library I saw that n is the number of intersection lines in the intersection and x and y are the coordinate of the intersection. But it’s realy unclear to me what is the meaning of index in the intersection line.
- Barcodes are defined by 4 bytes : x, y, flag and code.
It is unclear to me what is flag (I beleive that code is the numerical value associated with the barecode featured in all_code.pdf)…
Also in this the getMainFeature it’s written that there can only be 3 differents objects types (vector, intersection or barcode) transmitted. So what append if 4 objects are presents, ie a vector, an intersection and 2 barcodes ?
Looking to protocol reference it looks like the barcode feature data will be the agregation of the 2 barcodes feature data (one for each) and of course I beleive that feature length is twice a single barcode length. Am I right ?
Also is it possible (by setting the filters) to detect 2 or more intersections ? What happend if there are 2 intersections, a vector and a barcode ? Does you agregate intersections too ? And how to change filters parameters without USB ?
In the request, is there a difference between : request type = 0 with feature = 7, and request type = 1 ? Either does the feature has any meaning if type is set to all features ?
There is a setMode function. What are the possible values of mode ? Is it only “Turn delayed”, “Manual Select Vector” and “White line” ? Is there others features ? Is it really possible to have the whole list of mode parameters accessible (with UART) ? For exemple “White Line” parameter is undocumented in the Pixy2 documentation website (or I haven’t find it) but it can be found in the source code.
More generally in the documentation I can see “32-bit result/acknowledge”. What are the possible results and what numerical values are associated with error codes ?
I’ve read (on the website “Pixy2 communicates with “packets” in both directions – request and response. Each packet has the following structure, if no checksums are used” ) that it’s possible to communicate without checksum. So how to desactivate checksum ? If it’s impossible then how checksums are calculated ?
This is such a long mail so, I thanks you a lot for the time you will spent to bring me an answer.
Best Regards
H. Angelis (Professor)