Coder Social home page Coder Social logo

the-magister / mtd_hotlantis Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 4.45 MB

IoT codebase for a BurningMan-style art project.

Home Page: http://gameswithfire.com

Prolog 0.02% C++ 63.10% C 32.44% Makefile 0.02% Shell 0.17% CMake 0.19% Processing 0.31% Python 0.35% Assembly 0.18% HTML 2.11% CSS 0.57% JavaScript 0.54%
esp8266 burningman mqtt arduino art iot-application

mtd_hotlantis's Introduction

Moon Tower Defense and Hotlantis

Art Project

Overview

Atlantean Nautical Beacons illuminating the river as aids to navigation to wayward travelers. Moon Tower Defense (MTD) is the lighthouse, and the location by which participants interact with the project.

Hotlantis proposes a nighttime extension to Moon Tower Defense that allows participants to act as stewards of a lighthouse and beacons in the night to Atlantean travelers on Canyon Creek.

Philosophical Statement

Canyon Creek is different by day and night (diurnal). By day, it’s an exciting play-place; a place to float, cool off, dally. By night, it’s brooding, inscrutable, noisy and dangerous. We seek to express how experience varies depending on time of day, point of view, activity level, and community involvement. Hotlantis is flipside for Moon Tower Defense. By day, MTD defends when the creek is playful; by night, Hotlantis invites and guides when the creek is shrouded in darkness.

This diurnal feature returns upon sunrise and sundown, as well as constant features. During the day, Hotlantis provides solace with shade, hammocks, and water toys. At night, the lights come out to play along with a multi-track interactive musical and fire experience that varies based on the number of participants. We wish to communicate to participants that the experience will be regular, changeable, and replenishing.

Hardware Environment

MTD/Hotlantis is based on a distributed microcontroller (uC) environment that uses the MQTT protocol for communication. The uC's are ESP8266-based, generally, which provides a convenient WiFi stack under-the-hood. A central WiFi router serves as the hub for the project as well as the MQTT broker.

The uC's have hardware-level connections to peripheral devices that fall into two categories: sensors and actuators.

Sensors

Sensors provide input to the system for the purposes of interactivity. These are:

  • Clock: day-of-week and time-of-day information from a real-time clock device.
  • Cannon: two buttons on the physical cannon by the shore.
  • Buttons: three buttons atop MTD.
  • Motion: three passive, infrared (PIR) motion sensors below MTD.

Actuators

Actuators provide output from the system to generate actions, behaviors and gestures. These are:

Software Environment

MTD/Hotlantis is programmed in C++ within the Arduino IDE. It is impossible to cleanly delineate where the Electronics and Software functional domains form an interface. The general idea is that the Electronics group delivers a set of working hardware with a minimal code base that exercises the hardware. While it is possible to reprogram the uC's in-the-field, remember that these systems could be installed in the middle of a river in a watertight enclosure. Thus, it is strongly recommended that the Actuator and Sensor code base be brutally simple and robust, and all complexity reside in a single uC not associated with any hardware. This uC is referred to as the Controller, and should be the primary target of the Software functional domain.

MQTT PubSub Topics

The Electronics functional domain has kindly provided a Arduino library, MTD_Hotlantis, that operates the WiFi and MQTT stacks automagically. The main objective should be to:

  1. Sensor uC: Read sensors and publish to sensor topics.
    • Comms.pub("gwf/s/sensorReading","1");
  2. Controller uC: subscribe to sensor topics, integrate sensor information, define activities, publish to actuator topics.
    • Comms.sub("gwf/s/sensorReading");
    • when a new topic and message arrives:
    • if( topic.equals("gwf/s/sensorReading") ) Comms.pub("gwf/a/floodLight",message);
  3. Actuator uC: Subscribe to actuator topics and act on them.
    • Comms.sub("gwf/a/floodLight");
    • when a new topic and message arrives:
    • if( topic.equals("gwf/a/floodLight") ) setFloodLight( message.toInt() );

The MQTT topic hierarchy is as-follows. See MTD_Hotlantis.h for specifics.

  • gwf/ - top level
    • s/ - sensor topics
    • a/ - actuator topics

mtd_hotlantis's People

Contributors

giles7777 avatar the-magister avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.