Skip to content

About

Raspi code for idea machine

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

All Contributors

Idea Machine Raspberry Pi

This code is on a Raspberry Pi. The Raspberry Pi functions as an MQTT broker, which receives data from the smart cubes (see here:). The blue LEDs indicate whether each cube has established a connection to the broker. These turn on and remain on as soon as the cube has established a connection to the Pi. The sides of the dice are assigned to specific terms that are stored on the Pi. These can be customised to suit your needs. Now you have to press the buzzer until the green LED flashes. This transfers the terms to an LLM, which generates a futuristic text from them and prints it out via a thermal printer.

Required hardware:

Raspberry Pi (Raspberry Pi 5 4 GB)
A thermal POS printer (58 mm)
A Wi-Fi interface such as a router
Internet
Microcontroller with Wi-Fi
MPU sensor
Power bank 5000 - 10000 mAh Button/Buzzer LEDs

Installation

  1. Establish connection with Pi

  2. Clone the repository:

git clone https://github.com/technologiestiftung/idea-machine-raspi.git
cd idea-machine-raspi
  1. Run setup:
chmod +x setup.sh
./setup.sh

The script automatically installs:

  • Mosquitto MQTT Broker
  • CUPS & printer configuration
  • Python venv with all dependencies
  • .env with broker IP
  1. Adjust environment variables in .env

  2. Replace example logo in assets/logo.png

  3. Printer initialization (important):

    • Turn off printer
    • Unplug printer, wait a few seconds
    • Plug printer back in
    • Turn printer on
  4. Start the service

sudo systemctl start idea-machine.service

Debugging

Stop service:

sudo systemctl stop idea-machine.service

Run Python locally:

python main.py

Restart service:

sudo systemctl start idea-machine.service

Printer

How to get the most out of the printer. For example, to create a LOGO on the bong, the LOGO must be saved as a PNG file. The font must also be completely black and the background transparent.

Follow these steps to find out the printer specifications and insert them into the code.

CAD

In the CAD folder, you will find files for 3D printing. It is a case for the Pi with a lid. There is a slight recess in the lid where the buzzer can be embedded. Holes for LEDs and access to the Pi's ports.

GPIO

BUTTON = 23 GREEN_LED = 4 DICE_LED = 27, 17, 22

Preliminary resistance 220 to 440 ohms for the LEDs.

Contributors

Thanks goes to these wonderful people (emoji key):

Luise Brandenburger
Luise Brandenburger

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Content Licensing

Texts and content available as CC BY.

Illustrations by {MARIA_MUSTERFRAU}, all rights reserved.

Credits

Made by

Supported by

About

Raspi code for idea machine

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages