Coder Social home page Coder Social logo

brolly's Introduction

Brolly

A little umbrella game, you control with an actual umbrella - wireless of course.

See short case video here

You're a little guy flying with his umbrella through a dangerous world full of obstacles. As the player, you control the speed by opening and closing the umbrella, and you move the player left/right by tilting. The speed depends on how collapsed the umbrella is, where an fully opened umbrella is max speed and a closed umbrella is minimum speed.

The umbrella uses one flex sensor to detect how open/closed the umbrella is, two tilt sensors, a battery pack and a ESP8266 WiFi module to create a WiFI access point for MQTT communication.

How it works

The entire setup consists of three parts:

  1. Controller: Umbrella with NodeMCU and sensors.
  2. Server: MQTT broker to pass communication back and forth between umbrella and game.
  3. Game: Front-end canvas game

1. Controller/Umbrella

First, it creates a WiFi access point using the ESP8266 board, afterwards it connects to the server and start publishing sensor data to the server through the MQTT protocol. The controller is written in Lua.

Microcontroller

  • Name: ESP8266 NodeMCU
  • Producer: LoLin/WeMos
  • Generation: 2nd
  • Version: 1.0
  • “Common” name: v3

Sensors

  • 1x Flex
  • 1x Battery Pack
  • 2x Tilt Sensors

2. Server

MQTT Broker using Mosca. Forwards events form the controller to the front-end and at the same time process the sensor inputs.

3. Game/Front-end

Canvas game made using PIXI.JS, and MQTT.js for client-side MQTT.

Built in a few hours the night before delivery, prepare for spaghetti code, brain-farts and bugs.

Setup Controller/NodeMCU

Controller README.md

Setup Server

Server README.md

Setup Game

Game README.md

Links

Copyright

@ Terkel Gjervig

brolly's People

Contributors

terkelg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.