updated the GPIO usage of the python script to be independent of the bash scripts