Now fully working with wiring pi and non root. Added file to allow running from external import