Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Help for i2c script and LCDupdate engine
#1
Hi, I need a little help. Given that I am ignorant of programming and therefore I go to monkey among the various guides, I expose my problem hoping for your interest:

I want to drive an i2c lcd display, I tried with the guide of Dhrone7, but it didn't work. So I thought about going back to basics with a simple Python script like:

https://pastebin.com/4LgK8dXu

After editing it with nano and giving the command
Code:
sudo chmod +x lcd01.py

I tried it with
Code:
sudo python lcd01.py

and it works. The problem is: how to make it executable at startup since the address of the LCDupdate engine has disappeared in Moode Configure System?

[Image: lcd01.png?w=510&h=206]

I don't know how, since my programming bases are zero ...
Thanks for the help

translated with google translator from: Italian
Reply
#2
Code:
sudo nano /etc/rc.local
and add this line..

Code:
python /home/pi/lcd01.py
so it is the last entry before 'exit 0'

save and reboot..


There are more up to date ways of starting the script though this should work too.

Note too...I see from the above screenshot that you do not have the 'Metadata file" turned on...you will need to do that.
----------
bob
Reply
#3
(04-17-2020, 07:13 PM)DRONE7 Wrote:
Code:
sudo nano /etc/rc.local
and add this line..

Code:
python /home/pi/lcd01.py
so it is the last entry before 'exit 0'

save and reboot..


There are more up to date ways of starting the script though this should work too.

Note too...I see from the above screenshot that you do not have the 'Metadata file" turned on...you will need to do that.

Thanks.
Reply


Forum Jump: