Multiple Keyboards with RaspberryPi and OSC

Aus hyperdramatik
Zur Navigation springen Zur Suche springen

Installation

Python3

$ sudo apt-get update
$ sudo apt-get install python3 python3-dev python3-pip gcc

Python EvDev

Über das Python EvDev Package können wir auf Linux' input event interface zugreifen.
$ sudo apt-get install raspberrypi-kernel-headers
$ sudo pip install evdev

Python OSC

$sudo apt-get install python-osc

Code

  • Noch herausfinden: Python findet die Headers nicht, wenn man das Script auf dem Desktop speichert. Speichert man sein Script in Documents, läuft es problemlos...


Script beim Start des Raspis ausführen

http://www.instructables.com/id/Raspberry-Pi-Launch-Python-script-on-startup/


  • Das Raspi soll natürlich auch nicht in Ruhezustand gehen... Die Lösung:

Open a root terminal in raspberry Pi. Now you need to edit your script that's starting X. In the default build with lightdm.

Open "lightdm.conf" file located in,

/etc/lightdm/lightdm.conf

Add below line in to SeatDefault section.

[SeatDefaults]

xserver-command=X -s 0 -dpms

Restart your Raspberry Pi.