-
Notifications
You must be signed in to change notification settings - Fork 2
05 Controller plugins
Beside the user interface, there is as well hardware controllers, like external midi controller or the builtin buttons and pots. To be able to interact with the user interface, those hardware controllers must also be loaded in the application, using PLUGIN_CONTROLLER: ../path/of/the/controller.so
PLUGIN_CONTROLLER: ../plugins/build/libzic_MidiEncoderController.so
DEVICE: Arduino Leonardo:Arduino Leonardo MIDI 1
Some controller can get extra configuration. Any KEY: VALUE
following PLUGIN_CONTROLLER:
will be forwarded to the controller. In this example, we say to the controller to load the midi device Arduino Leonardo:Arduino Leonardo MIDI 1
.
EncoderController is a controller for rotary encoders.
Config:
-
ENCODER: id gpioA gpioB [gpioBtn]
will connect to gpioA and gpioB as an encoder. If gpioBtn is set, then it will connect to gpioBtn as a button.
Mpr121Controller is a controller for MPR121 capacitive touch sensor.
Those sensors used i2c bus. To be able to use it, you need to install pigpio library:
sudo apt-get install libpigpio-dev
You will need to activate the i2c interface in your rasberry pi using raspi-config.
Tip
You can use i2cdetect to find the address of your i2c device.
sudo apt-get install i2c-tools
Use the command i2cdetect -y 1
to list the addresses.
Config:
-
ADDRESS: 0x5c
will connect to i2c device at address0x5c
and watch all touch inputs. This can be called multiple times to instantiate multiple i2c devices
Keypad interface using Adafruit Neotrellis M4.
-
SERIAL: /dev/ttyACM0
open connection using serial port
Previous: 04-UI-Component-plugins | Next: 06-Config-plugins