Git Product home page Git Product logo

imperfectkaltenberg's Introduction

Imperfect Humanist

The Imperfect Humanist JS App provides an express backend API to provide portal status and a React frontend to visualize portal status.

Setup

 cd client
 npm install
 cd ..
 npm install

The frontend requires at least one video to be present in client/public/video/001.webm. Videos are not committed to git and need to be manually placed.

Run in dev

 # npm start on project root will bring up the backend on http://localhost:3001 and the frontend on http://localhost:3000
 npm start 

Build and serve

 # building the react client
 cd client
 npm build
 cd ..

 # npm run server will bring up the full Imperfect Humanist application (frontend and backend) on http://localhost:3001
 npm run server

Communication from RasPi to Arduino

The NodeJS/express based backend pulls portal state every 500ms from NIA API. It pushes this state forward to the Arduino, by making HTTP GET calls, whenever status changes, at most every 10s, at minimum every 60s. The portal state information is encoded in the GET URI, e.g.,

 GET /r/100/1/2/3/4/5/6/7/8/0 HTTP/1.1

Legend:

  • position 1: controllingFaction ('n' neutral, 'r' resistance, 'e' enlightened)
  • position 2: averagePortalHealth (0 - 100)
  • position 3-10: resonatorLevel (0 no resonator, 1-8 respective level)
  • position 11: extra effect (0 no effect)

imperfectkaltenberg's People

Contributors

haeusler avatar

Stargazers

Alastair Gifillan avatar

Watchers

 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.