josete89 / led_mqtt

Control a led via MQTT through esp32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LED-MQTT application

In this application you can control the LED on the ESP32 by sending messages to the MQTT broker. It uses ESP-MQTT library which implements mqtt client to connect to mqtt broker.

How to use example

Hardware Required

This example can be executed on any ESP32 board, the only required interface is WiFi and connection to internet.

Configure the project

  • Open the project configuration menu (idf.py menuconfig)
  • Configure Wi-Fi or Ethernet under "Example Connection Configuration" menu. See "Establishing Wi-Fi or Ethernet Connection" section in examples/protocols/README.md for more details.
  • When using Make build system, set Default serial port under Serial flasher config.

Build and Flash

Build the project and flash it to the board, then run monitor tool to view serial output:

idf.py -p PORT flash monitor

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.

About

Control a led via MQTT through esp32


Languages

Language:C 70.8%Language:Python 23.7%Language:CMake 3.8%Language:Makefile 1.7%