Treating the Design Studio as one grand Moore Machine, exposing outputs to users and mentors.
Magnet holder for cylinder magnet
See Lesson 8 for instructions on Digital Reed Switch sensor usage. Uses magnetic field to determine whether door is open.
Ultimaker http request API in Python written for the Design Studio. Might run into issues with firmware upgrades that invalidate currently available request APIs.
- Cylinder 0.25in x 0.25in (6mm x 6mm) magnet, i.e. one of these magnets on Amazon
- Mentor control DPDT switch (can be SPST)
KiCad project with a schematic for the state machine's circuitry. To export updated schematic to SVG, select "Plot schematic" from menu.
Physical presence of the state machine in the Design Studio. Bundles sensory inputs into a JSON and sends them to public-endpoint/ over a websocket at / (root) route
iot.vanderbilt.design (link won't show anything, doesn't serve any actual HTTP stuff)
Websockets server that routes data from the poller-pi to sign/ and site-overrides/ clients. Runs on Heroku, protected behind Cloudflare.
The below documentation is a general description of what's important. There's more specific documentation in the code itself.
- input
- / (root) route
- Receives JSON updates from poller-pi/
- weather.py Vanderbilt Stadium WeatherSTEM for current weather
- sometimes returns gibberish, only displayed if there is a degrees symbol in it
- mentors.py Google Sheet containing mentor shifts
- / (root) route
- output
- /sign route
- Serves open status to sign/ clients
- /printers route
- Serves printer images to site-overrides/ clients
- /hours route
- Serves calculated hours for the Design Studio
- /sign route
- logic (main.py)
- input-dependent
- Receive update from poller-pi. If no update received within 30s, proceed with an update containing empty state.
- Check if update actually changes the state.
- If so, send the updated states to clients connected to output endpoints. Else, do nothing.
- Repeat
- output-dependent
- client joins
- Send current state
- Add to keep-alive list
- client leaves
- Remove from keep-alive list
- keep alive (needed to stop Heroku from dropping long-running connections)
- Send current state to all clients every 50s
- client joins
- input-dependent
- Live Printer Feeds
- Live Sign Status
- Live Hours
- Current Schedule
React single-page progressive web app served by Netlify. Displays whether open, mentors if open, weather, and time.
Two outputs:
- Sign as an iframe on vanderbilt.design
- Fullscreen Chromium tab in Kiosk Mode on Raspberry Pi connected to two monitors
- This is the same pi as poller-pi/ and driver-pi/
Affects main site, vanderbilt.design.
Originally written by @yunyu, various visual improvements/fixes to the Design Studio Wordpress website including but not limited to:
- Add printer live feeds
- Add status sign
- Add dynamic hours
- Hide unfriendly youtube video & Vanderbilt social media links
- Make Wordpress theme column-sizes expand/contract properly on desktop and mobile
Client of public-endpoint at /sign route that runs on the Pi. Drives MOSFET gate pin to HIGH to activate relay. Changes synchronously with sign/.
T9AS1D12-5 SPST 5VDC Relay used to switch 120VAC for the traditional open sign above the door.
- Switches black cable connection
- White and green are connected directly
N-type Signal MOSFET that hooks GND on the Raspberry Pi to the relay. 3.3V I/O pins are not powerful enough to drive the relay so this is needed to do the heavy lifting.