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
Nesta página do site você pode assistir ao vídeo on-line Auto Run Python Program on Raspberry Pi4 Startup using Battery (Power Bank) duração online em boa qualidade , que foi baixado pelo usuário BINARYUPDATES 27 Março 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 39,904 vezes e gostou 604 espectadores. Boa visualização!