- install following dependencies via the Arduino IDE:
- PubSubClient (https://github.com/knolleary/pubsubclient)
- EspMQTTClient (https://github.com/plapointe6/EspMQTTClient)
- copy
config.h.dist
toconfig.h
and adjust the config options
- MQTT messages have a limit of 128 bytes - https://github.com/knolleary/pubsubclient/#limitations
- The font
TomThumb
is quite limited in the default setting, thus it needs to be adjusted in the library folder. Open the fileAdafruit_GFX_Library/Fonts/TomThumb.h
and changeTOMTHUMB_USE_EXTENDED
to1
and the0x7F
in the last line of this file to0xFF
or higher. For more details check out the github thread.
Sprites are generated via Piskel and then exported as C file.
Sending a payload to the MQTT_SUBSCRIBE_TOPIC
topic will update the text. The payload consists of two parts. The first is the index of the sprite and the second one is the text to display. Both are separated by a space.
The example below will use the logo at index 0
with the text Sunny
.
0 Sunny
Sending a payload with an integer to the MQTT_SUBSCRIBE_TOPIC_BRIGHTNESS
topic will update the brightness.