pimoroni/trackball-python

Trackball service install fails with cannot find module evdev message.

alphanumeric007 opened this issue · 11 comments

Running the Trackball service install fails with a cannot find module evdev message.
It looks like its installing the python 2 version but looking for the python 3 version.
If I run sudo pip3 install evdev and then rerun sudo ./install-service.sh it then works, and the trackball works on boot up.
This is with the latest Pi OS version.

I've been having similar issues but sudo pip3 install evdev didn't make any difference. I can get mouse.py to work after installing xautomation. however I want this to work on startup. Below is what I get trying to run evdevmouse.py
trackballnowork2

I'll try and boot up my Pi 400, and see what works and what doesn't latter on tonight. My only Trackball breakout is on that device. I'll post back what I find out.

Thanks, Im trying this on a CM 4 using the 64-bit OS. I got the same results on 32-bit.

I have several Pimoroni breakouts on that Pi 400 so I went with the 32 bit Pi OS. I look to be getting the same error message when I try to run evdevmouse.py. Maybe it needs to run as sudo? Also had to install xautomation to get mouse.py to work.

Just for the record, my mouse runs on bootup just fine. Installing the service works for me once I install the correct version of evdev. That being said, I could not get mouse.py to work on bootup via crontab? I had tried that as a work around when the mouse service install failed. Then went back to plan A and sorted that out by installing the correct version of evdev.

I've tried several versions of evdev to no avail. Did you connect the INT pin on the trackball to anything?

Yes, the int pin is connected to GPIO 4 / Pin 7. And now that you mention it, I seem to remember having to wire it up to make the trackball work? I thought I had a thread on that last bit on the Pimoroni forum but can't find it?

Thanks so much! This is really strange that Pimoroni isn't on top of keeping all the necessary info together and up to date. It is such a simple thing and yet I've reinstalled and started fresh about 6 or 7 times now.

I'm not making excuses, but I do think they need to improve on documentation etc. They seem to be short staffed, and get behind, documentation wise? Big ambitions, but short on the resources to pull it off?
That being said, when pressed for answers, they usually come through.
@helgibbons @Gadgetoid

Thanks, I also made it difficult for myself by using a CM4 with the Piunora carrier board so there is that added difficulty.

Yeah, custom setups can complicate things sometimes.
Mine is soldered to a Pimoroni Proto Zero, with another breakout soldered on the same header, on the other side of the Proto zero. With two other breakouts beside it soldered up the same way. Two i2c breakouts on each side of the Proto Zero. I had to remove a breakout on the back side to wire up the int pin. I had left it unconnected when I originally wired and soldered everything up. This was the first time I have ever "had" to use the int pin on any breakout.

If you look closely in the first picture, you can see the trackball next to an RV3028. Then another Proto Zero with two SPI Breakout Garden sockets with LCD's in them. Under that is a modified Phat Stack that plugs directly into the Pi 400 GPIO slot.
https://forums.pimoroni.com/t/my-pi-400-cpu-info-display/19850

Thanks @alphanumeric007 we are slowly trying to catch up and my good on open issue we will be better in the future :)