Skip to content

An epic immersive experience featuring Python control, a custom iOS app, MQTT triggered videos and lighting, and a realtime leaderboard.

Notifications You must be signed in to change notification settings

samhorne/lasermaze2019

Repository files navigation

Laser Maze 2019

For this year's Halloween, some friends and I decided to go all out and build an immersive laser maze. This quickly became the largest project I have ever undertaken, and challenged me to learn new things. Feel free to use this code for your own laser maze.

Block diagram

Links

Installation

Tested on a Raspberry Pi 2 Model B running Raspbian GNU/Linux 10 (buster).

  1. Setup virtual environment.
$ pip install virtualenv
$ virtualenv laser-maze
$ source laser-maze/bin/activate
  1. Inside that virtual environment, clone the repository.
$ cd laser-maze
$ git clone https://github.com/samhorne2/lasermaze2019.git
  1. Install the requirements.
$ pip install -r requirements.txt
  1. Install and start mosquitto.
$ sudo apt install mosquitto
$ sudo systemctl enable mosquitto
  1. Edit mqtt_send.py and mqtt-recieve.py with the IP address of your new MQTT broker.
  • mqtt_recieve.py -> line 25
  • mqtt_send.py -> line 22
client.connect("192.168.1.133", 1883, 60) #Your MQTT broker IP address here.

Setup the Game

  1. Run mqtt_recieve.py to begin listening for the following messages on the topic "maze".
$ python3 mqtt_recieve.py
MQTT Message Description
"arm" Activates all lasers and begins detecting sensors intrusions.
"aimblink" Blinks lasers whose sensors are intruded for aiming purposes.
"thresh" Set thresholds for each beam (the average brightness between laser on and off).
"reset" End the current game or stop aimblink.
"exit" Exit the entire game.

If you haven't setup the custom iOS app I made for this, you can easily use a tool such as MQTTool.

Like this project? Check out my other projects here!

About

An epic immersive experience featuring Python control, a custom iOS app, MQTT triggered videos and lighting, and a realtime leaderboard.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages