you can connect a LED to your raspberry pi to check weather your code is running or not
/home/pi/bashrc.
sudo python3 #LED file
sudo python3 #your file name
this should make your code run every time the power is on its not depend that you open the terminal or not
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…