<< return to Pixycam.com

Pixy 2 LEGO is not working well with barcodes

Hello everybody, thank you for taking the time to read this,

I have been having some troubles with my Pixycam and my Mindstorm being able to work with barcodes, so I thought I’d come here for help.

My Pixycam and my Mindstorm are able to follow lines very well. However, they work very rarely with the barcodes that tell them to turn left and right. When I run the line tracking algorithm, Pixycam can clearly recognize that there are barcodes in front of it, as it displays different numbers next to “barcode” on the MINDSTORM LCD screen when I slide different barcodes underneath the camera. However, when I run the line follow algorithm and try to make my Mindstorm turn at intersections with the barcodes, it usually stops for a split second when it sees the barcode and then keeps driving straight, without turning in the correct direction. There have been a couple of times when it has turned at an intersection when a barcode tells it to, but it is very rare. It has also turned the opposite way a couple of times, just as a side note. I have tried putting the camera at many different angles, tried moving the barcodes to many different locations, and tried making the barcodes larger, but nothing worked.

Pixycam can clearly recognize barcodes, but usually is unable to work with them. Am I doing something wrong? Do I need to change something with the code? Sorry if the solution is obvious, I am kind of a noob to using Pixycam, but I am very stuck. I am also sorry if I did not provide enough information. Let me know if you need any more information.

Thank you for your time.

Sorry for the problems. Have you tried running the Line Tracking Test just to see if Pixy is doing what you expect?



Thank you for the reply. Yes, I have tried running the line tracking test. Everything seems to be working mostly well. It seems that it may be a little iffy sometimes when recognizing intersections, and may display the number 3 next to “intersection” on the Mindstorm LCD screen, even if it is seeing a 4-way intersection, or the vector arrow would point to the left at an intersection even though it is supposed to point straight. For the most part, though, it can clearly recognize lines, barcodes, and intersections without a problem.

Thank you.