Closed DeadpoolDiego closed 1 year ago
https://github.com/pimoroni/st7789-python/blob/master/examples/image.py
python image.py /path/to/image/file.jpg
Ok I'm kind of a noob. Do I run the script using the Pi's console and put the path to the image after typing image.py or do I have to edit the script in some way.
Right. From the console, and put the image after image.py
Is there a way I can get it to do this automatically when the pi powers on?
If I use crontab -e to allow the pi to run a script from startup I have to type below it: "@reboot python /path/to/script.py &". Where do I put the path to the image in this command?
Just put it in /etc/rc.local
/path/to/python /path/to/script.py /path/to/image &
Find your path to python with: which python
There is an error when running the script regularly. It says "/usr/local/lib/python2.7/dist-packages/ST7789/_.init.py", line 124, in init" No such file or directory. I did also install the st7789 library. How do I fix this? It is important to note that when checking the file explorer, the specified file does exist.
Was the st7789 library installed via pip?
sudo apt-get update sudo apt-get install python-rpi.gpio python-spidev python-pip python-pil python-numpy
sudo pip install st7789
I have looked through the code (I have the small speaker board) but am still unsure how to select an image in the image example code. How do I select an image from files? Does the image need to be a certain format? What can I do?