Skip to content

wrtcoder/mqtt_demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a small example using mosquitto's MQTT client library.

It creates a client that connects to an MQTT broker at localhost:1883 (if running), then subscribes to the topics tick, control/#{PID}, and control/all. Every time it gets a tick message via the tick topic, it publishes its pid and uptime on tock/#{PID}. If the message halt is received on control/all or control/#{PID}, the client will free its resources and halt.

About

example using mosquitto MQTT client library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.8%
  • Makefile 3.9%
  • Shell 1.3%