Coder Social home page Coder Social logo

rube-goldberg's Introduction

This is both the client (Arduino*) and server (node.js) code for the NYUAD-NYUSH Rube Goldberg machine.

Originally we had planned to use socket.io, but because of NYU's interesting network restrictions, that option was less possible than we initially hoped. So this backup plan was implemented.

The backup works like this:

Each leg of the machine (i.e. each section with one or more locally connected objects) has a "Begin" point and an "End" point, which are connected to the internet.

The Begin points constantly send out HTTP requests (to unique URLs for each), and depending on the server's response, either 0 or 1, they WAIT or RUN respectively. Once the Begin point receives it's RUN signal, it ceases sending HTTP requests and runs the code that starts the local chain. (We set up our first Begin point to run once a Big Red Button had been pressed).

The End points simply run as normal (via the Arduino loop), until some sensor detects that the local chain has ended. Upon sensing the end of the local chain, the Arduino fires an HTTP request to a unique URL that then changes the response for the next Begin point from WAIT to RUN.

*The Ardunio example runs on an Ethernet board or with an Ethernet Shield, although some NYUAD implementations that were already connected to processing sketches simple fired the HTTP requests from their processing sketch, and the NYUSH side set up their systems on the YUN.

rube-goldberg's People

Watchers

 avatar  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.