Trilobot not working

I purchased a trilobot several years ago and as my Grandson had started to play with robot I thought I would have another go with it having recently purchased an x box controller. The various examples worked fine. They were not in a virtual environment. I could not get the x box controller to pair so I thought I would relad the software as per Pimoroni instructions and try again. I was informed that I need to set it up in a virtual environment which I did . Installed the trilobot module and checked it was there using pip list version 0.0.2 there however when I try to run the script I get the message :

Modulenotfound no module named ‘trilobot’

Help?

Jerry

Have you activated the virtual environment before running the examples?

That looks something like this (assuming you’re using our venv):

source ~/.virtualenvs/pimoroni/bin/activate

Yes, I have activated the vitual enviroment as evidenced by the prompt starting with (pimoroni). I have listed the modules present in the virtual environment and the pimoroni module is there, version 0.0 2 but when you run any of the scripts the error module not found no module named trilobot

That’s odd - what version of Pi OS are you using?

What commands are you using to run the examples? Perhaps a photo or screenshot showing what you’re seeing might help here?

Hel, Thank you for your reply. They say a little knowledge is a dangerous thing and in my case it is true. I am part of a raspberrypi group here in Edinburgh that meets once a month. I took my trilobot to the meeting and connected it up ro their power supply etc and ……… of course it worked. We then tried to think why and no one had an idea until I asked what command they had been using. I was advised that the command was “python avoid_walls.py”

I had been using “suddenly python avoid_walls.py.

I was advised that this was wrong.

I subsequently brought the trilobot home. Started from scratch, set up the virtual environment etc, used the command “python avoid_walls.py” and of course it worked.

So I have learnt something this week and I hope by answering your message others may avoid my mistake.

Thank you again

Jerry

1 Like

Sorry. The command line I had been using was sudo python avoid_walls.py damn predictive text!