I have a problem with running the python code! It runs on startup, and then stops. The python code contains "while loop" so It should never stop. When I write it in console manualy then it is working in the background but if I write it in rc.local It works only on the start up.
Here is my rc.local code: "sudo python /home/pi/my_directory/code_name.py & "
How to make it run in background automaticly?