Skip to content

mosaico-matrix/mosaico-software

Repository files navigation

Mosaico Software

Mosaico Logo

Welcome to the Mosaico Software repository! This software controls the LED matrix for the Mosaico ecosystem, running on a Raspberry Pi or your local machine as a simulator.


Table of Contents

  1. Introduction
  2. Requirements
  3. Installation
  4. External Libraries
  5. Creating Your First Widget
  6. Contributing
  7. License

Introduction

Mosaico allows users and developers to create, share, and display custom widgets on an LED matrix. More infos about the project can be found on the Mosaico Website.

Requirements

General Requirements

  • Python 3: Required for running Python scripts.
  • CMake: Required for building the C++ components.
  • Pip3: Python package installer for managing dependencies.
  • GCC: Required for compiling C++ code.
  • Git: Required for cloning the repository and widgets.
  • Pybind11: Required for Python bindings for C++ code.

Mode-Specific Requirements

Raspberry Pi Mode

  • Make sure to enable Bluetooth (Diepi: dietpi-config -> Advanced Options -> Bluetooth).

Simulation Mode (Local Machine)

  • libx11-dev: Required for launching the simulation window.

Installation

Compiling on Raspberry Pi

I suggest to use a lightweight OS for your Pi like Dietpi, especially if you're using a Raspberry Pi Zero. Once you have your Raspberry Pi set up, follow these steps to install the software:

  1. Install Required Packages:

    sudo apt-get update
    sudo apt-get install -y python3-dev python3-venv python3 python3-pip cmake build-essential git pybind11-dev python3-pybind11
  2. Clone the Repository:

    git clone --depth=1 https://github.com/mosaico-matrix/mosaico-software
    cd mosaico-software
  3. Run the Installation Script:

    ./start.sh default

    This script sets up the Python virtual environment, installs dependencies, and compiles the application.

  4. Run the Application:

    ./mosaico

Simulating on a Computer

  1. Install X11 Dependencies:

    sudo apt-get update
    sudo apt-get install -y libx11-dev python3-pybind11
  2. Run the Installation Script:

    ./start.sh simulation

    This sets up the environment and compiles the software to run in an X11 window.

  3. Run the Application:

    ./main

Cross-Compiling

  1. Set Up Cross-Compilation Tools: Install necessary tools for cross-compiling for Raspberry Pi. More info in CROSS-COMPILE.md

  2. Run the Installation Script:

    ./start.sh cross-compile

    This compiles the application for Raspberry Pi on a different architecture.


External Libraries

The following external libraries are included as submodules:


Contributing

We welcome contributions! Feel free to open an issue or submit a pull request.


License

This software is licensed under the AGPL-3.0 License. A copy of the license can be found in the LICENSE file.


Feel free to reach out if you have any questions or need further assistance!