polyatail / multiverse

Multi-verse, a Burning Man 2020 honorarium project
0 stars 0 forks source link

System design #3

Open polyatail opened 4 years ago

polyatail commented 4 years ago

The system will be controlled by two RPis: one user-facing, and one controlling the characters.

Character controller This RPi will run a small Flask API that receives complete 40-character verses over HTTP. It will have an RS485 shield with its transmission screw terminals connected to the character board. A single RS485 run will snake from PCB-to-PCB for a maximum run of <100 ft, easily within max spec for this protocol.

The 40-character verse will be chopped up into 5-character segments and assigned a binary number referring to its position in e.g., the top row. For example:

verse = "THE QUICK BROWN FOX JUMPED OVER THE DOG"

chopped_verse = {
    0b000000: "THE Q",
    0b000001: "UICK ",
    0b000010: "BROWN",
    0b000011: "FOX J",
    0b000100: "UMPED",
    0b000101: "OVER ",
    0b000110: "THE D",
    0b000111: "OG   ",
}

Each combination (above) of binary DIP-switch values and 5-letter piece of the verse will be sent over the wire one at a time as a 32-bit integer.

User-facing controller Some distance away, a second RPi with a USB keyboard will accept up to 40 characters at a time. When the user either 1) presses RETURN or 2) types 40 characters, the verse will be sent over WiFi to the character controller RPi, via HTTP. We should probably bring a WiFi router that they both connect to rather than trying to get them to connect directly to one another.