HoloControl

by RoggemanBent in Circuits > Raspberry Pi

401 Views, 1 Favorites, 0 Comments

HoloControl

HoloControl: Controlling my ESP32 with the Hololens on Unity over MQTT

Started this project with the question:

How can you easily visualize and control physical IoT devices in a living room via an Hololens 2 Mixed Reality application?

Supplies

Electronics:

  • Raspberry Pi 4 Model B
  • ESP32
  • DHT11
  • 4 LED + Resistors
  • RGB LED (strip)
  • 2-Channel Relay Module
  • Lamp

Materials:

  • 3DModel_Bottom.stl
  • 3DModel_Top.stl

Tools:

  • Screwdrivers
  • Scissor
  • Tape
  • 3D Printer

Fritzing Breadboard

breadboard.png

Fritzing Schematic

schematic.png

Installation Guide

Raspberry Pi

Update and Upgrade Raspberry Pi

sudo apt update && sudo apt upgrade
Install mosquitto MQTT broker
sudo apt install mosquitto mosquitto-clients
Enable mosquitto broker
sudo systemctl enable mosquitto
Checking status
sudo systemctl status mosquitto

ESP32

Install Thonny

https://thonny.org/

Go to Tools – Interpreter

  • Choose MicroPython (ESP32)
  • Choose COM of your ESP32
    • Install or Update firmware

Code

Save your code on MicroPython device

Unity

Install Unity

https://unity3d.com/get-unity/download

Install Visual Studio 2019

https://visualstudio.microsoft.com/downloads/

Download Mixed Reality Feature Tool for Unity

https://docs.microsoft.com/en-us/windows/mixed-rea...

Configure Unity for Hololens Development

https://docs.microsoft.com/en-us/windows/mixed-rea...

Create new project

https://docs.microsoft.com/en-us/learn/modules/lea...

Import MRTK

https://docs.microsoft.com/en-us/learn/modules/lea...

Code

  • Add Scripts to your Scripts folder
  • Code in Visual Studio 2019