martinohanlon / BlueDot

A zero boiler plate bluetooth remote
MIT License
141 stars 43 forks source link

auto run from Pi's Shell #166

Closed YXGuan closed 3 years ago

YXGuan commented 3 years ago

Hello Martin,

First of all, thank you for the amazing software!

My question: is there a way to pair Pi to my phone and run some Bluedot codes automatically every time Pi boots up?

The issue I have: it gives me an error when I tried to run my program from Pi's shell: No module named blue dot

Here's a screenshot of my error: screenshot screenshot

Could you help me out?

Thank you for your time.

ukBaz commented 3 years ago

I noticed that you did a pip3 (i.e. install it into your python3 setup) but then used the python command which by default will run python2.

Try using the python3 command instead.

martinohanlon commented 3 years ago

I would encourage you to head to the Raspberry Pi Forum raspberrypi.org/forum you will get a faster response and there is a much larger group of people who can help you.

A few points:

I am closing the issue as it isnt a bug with BlueDot.

ukBaz commented 3 years ago

Apologies in advance to Martin for posting this, but there are various advantages to using systemd over rc.local. I find the following a useful reference: https://blog.usedbytes.com/2019/11/run-at-startup-without-rc.local/

martinohanlon commented 3 years ago

Many many advantages of using systemd. The key disadvantage being that its a lot more complicated.

YXGuan commented 3 years ago

@martinohanlon @ukBaz Thank you all, Martin and Barry. Like you guys suggested: python3 fix the problem. Thanks again, it's really helpful. Have a wonderful day!

YXGuan commented 3 years ago

Keep up the good work!