Actually,I have written a program in python using tkinter and GPIO .Making GPIO go high or low when i press the button widget on the screen created using tkinter.Now i want those switch to appear on my screen as soon as i power on my raspberry pi and it boots up.
1)I am using raspberry pi 2 model B
2)my program named tkinter.py is in '/home/pi/tkinter.py'
3)I have opened /etc/rc.local and placed 'sudo python /home/pi/tkinter.py &' but it didnt work
please provide me a solution which runs when raspberry pi boots up.Thank you