In order to run script at startup, using crontab is fairly the best way.
Have you run crontab -ecrontab -e
as superuser ? (with sudosudo
)
If?
If not you must do so because only superuser can manage GPIO :
sudo crontab -e
sudo crontab -e
If you did, why don't you try capturing what happens in an error lolog like so :
@reboot [command] > actions_log.txt
@reboot [command] > actions_log.txt
Also, does crontab work at all for you ? You can do as follows to check :
@reboot touch test_file.txt
@reboot touch test_file.txt
And see if the file is created or not.