Edinburgh Hacklab

The Catastrophe Machine

Make it do something!

Startup

Plug in to turn on. The LEDs in the button will flash twice when connected.

MQTT Usage

State updates

The lever, button and LED states are broadcast over MQTT when changed, in these topics:

catastrophe/state/lever
catastrophe/state/button
catastrophe/state/light

You can prompt the machine to update these topics by pinging the following topics (payload can be null, is ignored):

catastrophe/lever
catastrophe/button
catastrophe/light

Toggling the LED

The LEDs can be remotely toggled by pinging the following MQTT topic with “on” or “off”:

catastrophe/set/light

PINOUT

The external pins are toggled HIGH (3.3V) or LOW depending on the state of their corresponding component.

  • WHITE: Lever pin
  • BLUE: Button pin
  • RED: LED pin

Code

The project is coded using the Arduino library and IDE. Source can be found in the LabThings GitHub.

catastrophe.txt · Last modified: by vgorl