The function is based on MQTT. When the original serial of ESP8266/ESP32 cannot be used, it can replace serial print.

MqttPrint and MqttMonitor

The function is based on MQTT. When the original serial of ESP8266/ESP32 cannot be used, it can replace serial print.

MqttPrint

A Arduino library MqttPrint

Easy Arduino example:

#if defined(ESP32)
#include <WiFi.h>
#else
#include <ESP8266WiFi.h>
#endif

#include "MqttPrint.h"

// Update these with values suitable for your network.

const char* ssid = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASSWORD";

const char* MqttServer = "broker.emqx.io";
const char* MessageTopic = "YOUR_MQTT_SUB_TOPIC";

void setup() {

    Serial.begin(115200);
    
    //
    // Begin to connect to thw WiFi AP.
    //
    Serial.println("setup : Attempting to connect...");
    WiFi.mode(WIFI_STA);
    WiFi.begin(ssid, password); // Connect to WiFi.

    int count = 0;
    while (WiFi.status() != WL_CONNECTED) {
        if (count > 30)
        break;
        delay(500);
        Serial.print(".");
        count++;
    }

    Serial.println("");
    Serial.println("WiFi connected");
    Serial.println("IP address: ");
    Serial.println(WiFi.localIP());
    
    mbegin(MqttServer, 1883, MessageTopic);

}

void loop() {
    mprint("millis = ");
    mprintln(millis());
    mprintln("Hello World");
    mprintf("TEST = %d\n", millis());
    delay(1000);
}

MqttMonitor

An application to receive the MQTT messages. It's written in Python. Please install it by the command.

pip install MqttMonitor

How to run 'MqttMonitor'?

  • Right-click on your desktop and select New > Shortcut.

  • Add the below string in the textbox - "Type the location of the item:" and press 'Next'.

    pythonw.exe -m MqttMonitor

  • Add the below string in the textbox - "Type a name for this shortcut:" and press 'Finish'.

    MqttMonitor

Usage

MqttPrint is a MQTT sender, MqttMonitor is a MQTT receiver. They should use the same MQTT broker and sub topic. This is the screentshot of MqttMonitor.

alt screenshot

Similar Resources

Serial Data Monitor is a multiplatform (Windows, Linux, Mac, ...) tool to interactively receive/edit/monitor data and send commands to an embedded system via the serial bus

Serial Data Monitor is a multiplatform (Windows, Linux, Mac, ...) tool to interactively receive/edit/monitor data and send commands to an embedded system via the serial bus

See wiki for full documentation Serial Data Monitor Description Serial Data Monitor is a multiplatform (Windows, Linux, Mac, ...) tool to interactivel

Oct 29, 2021

Utility for testing random and pseudorandom sequences, either as bytes or bit streams, reporting entropy, mean value, serial correlation, chi square, and Monte Carlo estimate of an value, serial correlation, chi square, and Monte Carlo estimate of π.

ENT — Fourmilab Random Sequence Tester The Fourmilab Random Sequence Tester, ent, applies various tests to sequences of bytes stored in files and repo

Dec 15, 2022

Allows an easy way to replace levels' songs with their respective NONG songs.

NONG-Replace Allows an easy way to replace levels' songs with their respective NONG songs. NOTE: THIS REQUIRES MEGA HACK V6!! If you do not have it, t

Nov 10, 2021

A Stub DLL replace in-game text

Gujian3TextMod A Stub DLL replace in-game text messages. Original DirectSound wrapper DLL implementation from DirectX-Wrappers The code was modified t

Nov 16, 2022

dump and replace shaders of any OpenGL or Vulkan application

deshade deshade is a library that allows you to dump and replace the shaders of any OpenGL or Vulkan application, which includes: GL2 + extensions, GL

Aug 10, 2022

ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project)

ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project)

esp32_esp8266_organ ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project) link to the video The required li

Dec 12, 2022

ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project)

ESP32, ESP8266 based MIDI Organ using the ML_SynthTools library (little example arduino project)

ml_synth_organ_example MIDI Organ using the ML_SynthTools library (little example arduino project) link to the video This project is an example suppor

Dec 12, 2022

An embedded CAN bus sniffer which is able to monitor any of the vehicle internal CAN bus and perform some action by triggering new CAN messages.

An embedded CAN bus sniffer which is able to monitor any of the vehicle internal CAN bus and perform some action by triggering new CAN messages.

An embedded CAN bus sniffer which is able to monitor any of the vehicle internal CAN bus and perform some action by triggering new CAN messages. In this way certain vehicle functionality can be triggered by responding to custom steering wheel button events, or use the vehicle virtual cockpit to display OBD-PIDs values instead of relying on an external display to present new information to the user

Dec 28, 2022

Commodore 6502ASM, the original 6502/65C02/65CE02 Assembler used by Commodore for C65 project

Commodore 6502ASM This is the source code of the 6502/65C02/65CE02 assembler developed and used by Commodore for the C65 project. It aims to be compat

Nov 29, 2022
Allows for multiple SwitchBot buttons and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Meter/Temp Sensor

SwitchBot-MQTT-BLE-ESP32 Switchbot local control using ESP32. no switchbot hub used/required. works with any smarthub that supports MQTT https://githu

Dec 27, 2022
Dec 29, 2022
Dec 31, 2022
A simple tool using PC mouse via USART to control MCU and LCD/OLED (with LVGL library), if your screen cannot be controlled by touch.
A simple tool using PC mouse via USART to control MCU and LCD/OLED (with LVGL library), if your screen cannot be controlled by touch.

LVGL_USB_Mouse A simple tool using PC mouse via USART to control MCU and LCD/OLED (with LVGL library), if your screen cannot be controlled by touch. 如

May 5, 2022
The pico can be used to program other devices. Raspberry pi made such an effort. However there is no board yet, that is open-source and can be used with OpenOCD as a general-purpose programmer
The pico can be used to program other devices. Raspberry pi made such an effort. However there is no board yet, that is open-source and can be used with OpenOCD as a general-purpose programmer

pico-probe-programmer The pico can be used to program other devices. Raspberry pi made such an effort. However there is no board yet, that is open-sou

Oct 15, 2022
A refactored Proof-of-concept originally developed in 2017 to print all function calls with their arguments data types and values using Ptrace during program execution.

print-function-args-debugger A refactored Proof-of-concept originally developed in 2017 to print all function calls with their arguments data types an

Jun 17, 2022
Original hVNC has been recoded to work with all version of windows above XP. Thanks to the original author for this wonderful tool.

hVNC - Recoded This is the recoded version of the hVNC found in TinyNuke trojan. Compiling Compile tested with Visual Studio 2017. No compile errors.

Jan 22, 2022
Connected Santa Claus hat based on an ESP32, 8x8 matrices and LEDs stripped communicating over the internet with MQTT.
Connected Santa Claus hat based on an ESP32, 8x8 matrices and LEDs stripped communicating over the internet with MQTT.

Protobonnet What is it? A connected Santa Claus hat! What is it called? Le ProtoBonnet! Why? This hat has been created entirely for the Noël des proto

Dec 27, 2021
ESP32-Skid-Steer - Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on the model.
ESP32-Skid-Steer - Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on the model.

ESP32-Skid-Steer Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on

Oct 27, 2022