Matrix8 is an open-source Kotlin Multiplatform (KMP) project designed to run on a Raspberry Pi. It is a guitar pedal switcher based on the ADG2188 chip, providing control over your pedal setup. Matrix8 also runs a Bluetooth Low Energy (BLE) service, allowing remote control via BLE-enabled devices. Additionally, it can render the switcher's state on a connected display using Compose Desktop.
- Kotlin Multiplatform: Leverage the power of Kotlin to build and run on multiple platforms.
- Raspberry Pi Compatible: Designed specifically to run on Raspberry Pi hardware.
- Guitar Pedal Switching: Control your guitar pedals effortlessly using the ADG2188 chip.
- BLE Service: Remotely control the switcher via BLE.
- Display Rendering: Visualize the state of your switcher on a connected display using Compose Desktop.
- Bluetooth Libraries: Utilizes Bluez and BLE-java libraries for BLE functionality.
- I2C Communication: Uses pi4j library for I2C communication with the ADG2188 chip.
To get started with Matrix8, you will need the following:
- A Raspberry Pi (any model with GPIO support)
- ADG2188 chip
- Display compatible with Raspberry Pi (e.g., HDMI or GPIO-based display)
- BLE-enabled device for remote control
You need to create your circuit board to use ADG2188, not possible to do with a breadboard as the available packages for this chip require surface mounting soldering. Please reach out if stuck.
-
Clone the repository:
git clone https://github.com/kikermo/matrix8.git cd matrix8
-
Set up your Raspberry Pi:
- Ensure your Raspberry Pi is running the latest version of Raspbian.
- Connect the ADG2188 chip to the GPIO pins of the Raspberry Pi.
- Connect your display to the Raspberry Pi.
- Install the Bluez library:
sudo apt-get install bluez
- Install libdbus-java:
sudo apt-get install libdbus-java
-
Run the project:
./gradlew :composeApp:run
-
Generate the project JAR for linux_arm64: To generate the project JAR specifically for the
linux_arm64
architecture, run the following command:./gradlew :composeApp:packageReleaseUberJarForCurrentOS
This command would generate the JAR package for the machine building the project if you want to build for the Raspberry Pi from another device, you need to change the compose desktop dependency from
implementation(compose.desktop.currentOs)
toimplementation(compose.desktop.linux_arm64)
To deploy Matrix8 to your Raspberry Pi, follow these steps:
-
Build the project:
./gradlew build
-
Copy the JAR file to your Raspberry Pi:
- Use
scp
to copy the built JAR file to your Raspberry Pi:scp build/libs/matrix8.jar pi@<your-raspberry-pi-ip>:/home/pi/
- Use
-
SSH into your Raspberry Pi:
ssh pi@<your-raspberry-pi-ip>
-
Run the application on the Raspberry Pi:
java -jar /home/pi/matrix8.jar
Once the application is running on your Raspberry Pi:
- Switching Pedals: Use the connected display to navigate and control your pedal setup using the UI. UI is WIP.
- BLE Control: Use any BLE app like BLE scanner or LightBlue. You can also build your own mobile app. KMM sample app WIP.
We welcome contributions to Matrix8! To contribute, follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
Please ensure your code adheres to our coding standards and include appropriate tests.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- JetBrains for Kotlin and the KMP framework.
- The Raspberry Pi Foundation for the Raspberry Pi.
- Analog Devices for the ADG2188 chip.
- Bluez for the Bluetooth stack.
- BLE-Server library for BLE functionality.
- pi4j for I2C communication.
- Compose Desktop for rendering the UI.
For any questions or support, please open an issue on the GitHub repository or contact the project maintainer at [email protected]. Feel free to reach out with any questions about the software or the hardware. Any feedback is welcomed.