Giter VIP home page Giter VIP logo

thundertube's Introduction

⚡ The ThunderTube ⚡

(watch it in action)

Overview

An application for live-coding some LEDs in the Recurse Center space.

The application has three components:

  • Javascript client: for sending websocket data for lights
  • A server on a teensy board for handling websocket connection and powering lights
  • A MongoDB server for persisting code

There is an additional branch called simulator which has a 3D simulator written in THREE.js that you can access online at thundertube.now.sh. (Maintained by @strickinato)

It's all run on a raspberry pi on the Recurse LAN. ([email protected])

Get it running

npm install
node server/index.js

Now go to http://localhost:5000

The Client

Dependencies

The client uses code mirror for the editor. For the client dependencies, we don't use a build script and instead they're directly referenced from the the source code in client/lib directory. See the index.html for how they're included.

The Teensy Board

About

The hardware is a prototype of Max D's (F2'18) LEDRiver project - which is based around a Teensy3.2 board.

Programming the board

(Done on Mac v10.13.16)

Install the arduino editor. Then install the teensy extension

Go to Tools → Manage Libraries, then search for and install SSD1306Ascii Then, in /Applications/Arduino.app/Contents/Java/libraries/, delete Ethernet/ and SD/

Install the following in ~/Documents/Arduino/libraries/:

Now open the Arduino IDE, and select Tools → Board → "Teensy 3.2"

Troubleshooting

  • There are many modes. A button on the side controls what mode we're in. Thundertube expects "websocket control mode"!
  • Try unplugging and plugging back in!

The saved code server

This is hosted on mongo.

The Raspberry Pi

The raspberry pi by default has LXDE, a linux distro that is heavily built around the Desktop Manager Open Box. In order to set it up to launch our page right away, we took some of the following common raspberry pi steps.

Useful shortcuts provided by openbox

  • alt+f4 - close window
  • alt+ctrl+f1 - jump out of Desktop Manager to TTY
  • Right click on things - the context menus are great

Setup Hostname:

You should be able to find this Raspberry Pi on the Recurse Network. It's called thundertube This is done by simply editing /etc/hostname.

Enable SSH

This means you can SSH into the pi if you're on the Recurse Center network. Use ssh [email protected] The password for the pi user is the same as the password for the Recurse Center network.

Enabling SSH on raspberry pi's can be done by adding a file named ssh to the root directory.

Boot without login

As soon as the raspberry pi boots, it should launch our page. This is accomplished by running our startup script

  1. sudo raspi-config > Boot Options > Desktop / CLI > Desktop AutoLogin
  2. Edit ~/.config/lxsession/LXDE/autostart
# These prevent screen from turning off
@xset s off
@xset -dpms
@xset s noblank
/home/pi/thundertube/startup.sh

thundertube's People

Contributors

dsherry avatar jven avatar strickinato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jven strickinato

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.