OhNoItsMrBill wrote: However, it looks like the code has to be run with Sudo as the GPIO appears to need root access. Is there any way around this?
sudo is probably the easiest way to run your code. the other possibility would be to change the ownership or permissions on the various device files. problem is i'm not sure when or where these are created. some of them only seem to exist while your script is running. some of them can be created if you are logged in as root, (but i can't log in as root on my pi), or if you use "sudo -i", (which will effectively log you in as root).
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly