/esp-idf-mqtt-image-viewer

Image viewer using mqtt

Primary LanguageCMIT LicenseMIT

esp-idf-mqtt-image-viewer

Image viewer using mqtt and SPI TFT.

M5Stack-JPEG

slide-0001

slide-0002

slide-0003

Software requirements

ESP-IDF V5.0 or later.
ESP-IDF V4.4 release branch reached EOL in July 2024.
ESP-IDF V5.1 is required when using ESP32-C6.

Hardware requirements

SPI TFT.
Supported TFTs:
https://github.com/nopnop2002/esp-idf-ili9340

Installation

git clone https://github.com/nopnop2002/esp-idf-mqtt-image-viewer
cd esp-idf-mqtt-image-viewer/
idf.py set-target {esp32/esp32s3/esp32c3/esp32c6}
idf.py menuconfig
idf.py flash

Note for ESP32-S2/C2
ESP32-S2/C2 has less SRAM, so it cannot be executed.

Configuration

config-main config-app

Network Configure

You have to set this config value with menuconfig.

  • CONFIG_ESP_WIFI_SSID
    SSID of your wifi.
  • CONFIG_ESP_WIFI_PASSWORD
    PASSWORD of your wifi.
  • CONFIG_ESP_MAXIMUM_RETRY
    Maximum number of retries when connecting to wifi.
  • CONFIG_BROKER_URL
    MQTT Broker url or IP address to use.
    You can download the MQTT broker from here.
  • CONFIG_MQTT_TOPIC
    MQTT topic to subscribe.

config-network

TFT Configure

Follow here.

config-tft

How to use

mosquitto_pub -d -h your_broker -t image/example -f esp32.jpeg

M5Stack-JPEG

mosquitto_pub -d -h your_broker -t image/example -f esp_logo.png

M5Stack-PNG