Flipdot: Difference between revisions
Created page with "{{Project |image=File:Asj_flipdot.jpg |name=Comfy Flipdot |primary=Aaron |created= |completeddate= |dormantdate= |version= |members=Aaron, JonW |location=Comfy Area |repo= |status=In Progress |type=Infrastructure |livestatus=Live |LookingforCollaborators=Yes }} The Comfy Area now features a (very nice) flipdot display and listens on MQTT for members to play with. The display is driven by a custom board, which you can r..." |
No edit summary |
||
| Line 25: | Line 25: | ||
The display listens to the following [[MQTT Topics]]: | The display listens to the following [[MQTT Topics]]: | ||
* <code>nh/flipdot/comfy/buffer</code> to switch between buffers (see more later) | |||
* <code>nh/flipdot/comfy/text</code> for text messages | * <code>nh/flipdot/comfy/text</code> for text messages | ||
* <code>nh/flipdot/comfy/raw</code> for binary buffers | * <code>nh/flipdot/comfy/raw</code> for binary buffers | ||
| Line 30: | Line 31: | ||
You can send MQTT messages to the broker running on Jarvis, either by logging into [[Jarvis]] or by specifying jarvis as the endpoint for your MQTT client. | You can send MQTT messages to the broker running on Jarvis, either by logging into [[Jarvis]] or by specifying jarvis as the endpoint for your MQTT client. | ||
==== Buffers ==== | |||
Since the hope is that many people will interact with the display, to avoid it being left on the last "frame" of your demo, you can switch to another buffer before starting, then jump back to buffer 0 once finished. Things like Discord will always use buffer 0, so it'll default to the most accessible mechanism for showing messages. | |||
There are 100 buffers available :) As an example, for Jon's game of life, we might do: | |||
* <code>nh/flipdot/comfy/buffer</code>, "12" | |||
* <code>nh/flipdot/comfy/raw</code>, game of life frame 1, etc... | |||
* <code>nh/flipdot/comfy/text</code>, "GAME OVER" | |||
* <code>nh/flipdot/comfy/buffer</code>, "0" | |||
=== Discord === | === Discord === | ||
Latest revision as of 10:52, 20 October 2025
| Comfy Flipdot | |
|---|---|
| Primary Contact | Aaron |
| Members | Aaron, JonW |
| Location | Comfy Area |
| Status | In Progress |
| Type | Hackspace Infrastructure |
| Live Status | Live |
The Comfy Area now features a (very nice) flipdot display and listens on MQTT for members to play with. The display is driven by a custom board, which you can read about on Aaron's website. The functionality of the display has been intentionally left as a blank canvas for members to play with.
Interacting
You are encouraged to build stuff! The display takes around 350ms to redraw - please do not send commands faster than this. Ideally stick to around 500ms. The display is 84x8 dots.
MQTT
The display listens to the following MQTT Topics:
nh/flipdot/comfy/bufferto switch between buffers (see more later)nh/flipdot/comfy/textfor text messagesnh/flipdot/comfy/rawfor binary buffersnh/flipdot/comfy/brightnessfor illumination brightness (0 to 100)
You can send MQTT messages to the broker running on Jarvis, either by logging into Jarvis or by specifying jarvis as the endpoint for your MQTT client.
Buffers
Since the hope is that many people will interact with the display, to avoid it being left on the last "frame" of your demo, you can switch to another buffer before starting, then jump back to buffer 0 once finished. Things like Discord will always use buffer 0, so it'll default to the most accessible mechanism for showing messages.
There are 100 buffers available :) As an example, for Jon's game of life, we might do:
nh/flipdot/comfy/buffer, "12"nh/flipdot/comfy/raw, game of life frame 1, etc...nh/flipdot/comfy/text, "GAME OVER"nh/flipdot/comfy/buffer, "0"
Discord
You can send images and text from Discord using the !flipdot command. Sending !flipdot Hello! will just send the message hello. If you send a message which is valid base64, and the decoded base64 is 84 bytes long, it will be interpreted as an image.
Image Format
Sending raw images is possible via both MQTT and Discord (which is eventually just sending an MQTT message...). Each byte represents a single column and so an entire image should be 84 bytes long.
It's possible to convert most image formats to this binary format using ImageMagick and some awk.
export LC_CTYPE=C
magick -monochrome 84x8image.png -rotate 180 pbm: | \
tail -n8 | \
awk '{for(i=1;i<=NF;i++)a[i]+=lshift($i,NR)} END {i=1;while(i in a){printf("%c",a[i]); i++}}' \
> msg
The contents of msg can then be sent via MQTT to nh/flipdot/comfy/raw. For example, to do this with Mosquitto CLI tools, you can do mosquitto_pub -t nh/flipdot/comfy/raw -f msg. You can also send it on Discord by first converting it to base64: base64 -w0 < msg and pasting that after the !flipdot command.
Contributions
Built something? Please add it here (and your name to the collaborators field in the Project box above).
- JonW has implemented Game of Life, which runs every hour for 100 evolutions.
More Ideas
- A handhold game console which talks to the display over WiFi to send the frames.
- Show live scores for Panthers games using the free API from The Sports DB.
- Periodically show when the next bus of your choice will be arrive at the stop.
