Hi,
I’m playing around with a lot of sensors and ran out of DAGU-ARDuino options (as far as I can understand the layers of code up till now). So, I’m attempting to use the GPIO-pins as they are there and all open for gaming.
So, I wrote some ordinary commands in my script: Import RPi.GPIO as GPIO; GPIO.setmode(GPIO.BCM): TRIG=23, GPIO.setup(TRIG, GPIO.OUT)
And there’s where I got stuck. I get the notorious output: “RuntimeError: No access to /dev/mem. Try running as root!” Obvious, since I’m running through py_websockets_bot. (I also try to make use of the mini_driver for the motors, servo’s and some sensors).
Googling brought me the escape of running the script from IDLE 3. So, I created a copy-script with all print-statements converted to Python-3 syntax, but then I encountered the phenomena that IDLE 3 doesn’t use the same path and module/class conventions and py_websockets_bot.mini_driver (a.o.) suddenly was unknown.
Being an amateur, I got annoyed at that point: lacking the proper docs in detail, I was thinking about defaulting to the standard Raspbian image, building from scratch and do the Arduino sketching also. To be honest: that’s too much for an elderly ;-0)
So, I’m wondering if there’s a way to enforce root-rights from within my scripts. Maybe it is possible to use the parser? Or fit in some additional Linus-scripts?