GPIO10 already used | run octoprint as root? & how?

What is the problem?

The SPI GPIO-Pin "10" is already in use (Touchscreen)
In order to use the "RGB Status" plugin, i would need to connect the data pin to GPIO10, or run octoprint as root (to use another GPIO Pin)

What did you already try to solve it?

Tried to add the "pi" user to "gpio"-Group -> already is.
I tried to run octoprint as root, but I am not really sure how to do so.

Hello @Hasinator!

SPI is a bus system (https://en.wikipedia.org/wiki/Serial_Peripheral_Interface). You should be able to connect both to pin 10.

Thank you for your quick response

I tried connecting both to pin 10 -> didn't work
Tried another RaspberryPi with no touchscreen driver installed -> works


conclusion: connecting both to pin 10 doesn't work

According to the Wiki I linked, you may put the links in serial.

1st


RaspiMosi -> TouchscreenMosi | TouchscreenMiso -> LED-DataIn | LED-DataOut -> RaspiMiso
= doesn't work (LED & Touchscreen)


2nd
RaspiMosi -> TouchscreenMosi & LED-DataIn | TouchscreenMiso & LED-DataOut -> RaspiMiso
= doesn't work (LED & Touchsceen)


3rd
RaspiMosi -> TouchscreenMosi & LED-DataIn | TouchscreenMiso -> RaspiMiso
= doesn't work (LED) -> Touchscreen works

Update:


I didn't get the Neopixels working in series with the touchscreen.


I did get octoprint running as root though:

  • mounted the octopi sd card (on another pi or any linux machine)
  • edited the /etc/sudoers file (passwordless sudo)
    pi ALL=(ALL:ALL) NOPASSWD:ALL
  • edited the /etc/default/octoprint file:
    OCTOPRINT_USER=root
    DAEMON_ARGS=--iknowwhatimdoing

Maybe someone can use these instructions.
Please note that this might be a security issue!




additional info:

  • connected LED-DataIn to Pin 21 (BCM)
  • i am using a level shifter (3,3V to 5V)