<< return to Pixycam.com

Pixy2 install with Raspberry pi 4 issue

I’m having an issue installing Pixy 2 with raspberry pi 4 using the terminal. I follow the documentation to install the dependencies but I run to an issue with a certain line of code, the code is in the picture I attached. It would say no file or directory at the second command line code when building libpixyusb2.sh
Any help would be appreciated!!
I have attached picture below showing it saying no file or directory at that line.
The website I am following to code is from pixy 2. Here it is https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:hooking_up_pixy_to_a_raspberry_pi

image|284x500

Hello,
Can you copy and paste the error you receive?

Edward

No file or directory when trying to build that line of code.

Hi, it looks like the root cause is the fatal error after the first command. You need to delete the pixy2 directory before running git clone, otherwise it will fail to copy all the files over.

Try running rmdir -r pixy2 and then following the instructions again. If it complains, you may need to run it as root: sudo rmdir -r pixy2

Let us know what happens, thanks!

I tried doing that but it doesn’t work, here is the image:

OK, try it without the -r flag: rmdir pixy2

Hello,
I think you might try

sudo rm -rf pixy2

Edward

After I deleted the pixy2 file, I now try to install pixy2 files from the forum provided by pixy2. Once I get to the line for cloning pixy2, I get an error, I am not sure what could be wrong?

Hello,
It appears to be a networking issue on your Pi. This site might help:

This is Pi-related configuration.

Edward

Continuing the discussion from Pixy2 install with Raspberry pi 4 issue:

Okay that worked but now I have a question on how do I run the pixy 2. I looked online and I find a lot of arduino examples, I am looking for raspberry pi with python examples. I am trying to make the robot being able to follow a person wether it’s color or barcode. I just don’t know how to code that in raspberry pi with python. Any help on this would be appreciated and I want to say thanks for all the help I have been getting!

Hello,
You are talking about tracking an object. The pan-tilt demo is a tracking example. It’s in the libpixyusb2 distro that you installed and built.

It’s a good starting point, so get familiar with how to write a control loop and track an object with Pixy.

Hope this helps :slight_smile:

Edward

Does pixy2 only run codes with c language? I want to integrate that example into my python code, what can I do?

Hello,
Here is the python version.

It is part of the python distribution:
https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_libpixyusb_as_a_python_module_on_linux

Hope this helps :slight_smile:

Edward

I been getting errors when trying to run that code. Any idea why?

Hello,
You are using an IDE that I’m not familiar with. Try to run it from a bash prompt and let me know what you find.

Edward

How do I run it on bash prompt, I am sorry but I am new to Linux on raspberry pi as well. I do appreciate your kind help.

Never mind I got the python example demos working on geany but it didn’t work on thonny ide. An issue I am having right now is when I run the python demo, I also run pixymon on my raspberry pi, but it can’t do both at the same time. I get segmentation fault. Using the pixy with the raspberry pi, has been very stressful. So many problems, one after another. If I can get direct help, I would appreciate it.

Any help regarding this?? Anyone? I can’t run pixymon and compile code together on raspberry pi? Any solutions??

Hello,
Unfortunately, you can’t run the demos and Pixymon at the same time since they use the same USB port.

Regarding the bash prompt, this is what is commonly referred to as a command prompt or “shell”. (what you type linux commands into.)

Edward

So how can I then see if the object tracking when code running and detecting correctly if I can’t use pixymon?