We'll learn how to Auto Run Python Program on Startup. In the end, we'll Power-up Raspberry Pi using Power Bank to automate running python script on boot. We can learn how stand alone product run python program. So we don't need to use terminal and run python script manually.
How to run a python script on Raspberry Pi Boot (4-STEP PROCESS)
sudo raspi-config
Select “Boot Options” then “Desktop/CLI” then “Console Autologin”
In the command prompt or in a terminal window type:
sudo nano /etc/profile
Scroll to the bottom and add the following line
sudo python /home/pi/brightness.py &
where “/home/pi/brightness.py” is the path to your script.
Type “Ctrl+X” to exit, then “Y” to save followed by “Enter” twice.
sudo reboot
En esta página del sitio puede ver el video en línea Auto Run Python Program on Raspberry Pi4 Startup using Battery (Power Bank) de Duración online en buena calidad , que subió el usuario BINARYUPDATES 27 marzo 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 39,904 veces y le gustó 604 a los espectadores. Disfruta viendo!