Skip to content

Instantly share code, notes, and snippets.

@hatsunea
Created June 30, 2022 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hatsunea/b86b40cc1a1e6c5c0e4bd9df6f0a4d8c to your computer and use it in GitHub Desktop.
Save hatsunea/b86b40cc1a1e6c5c0e4bd9df6f0a4d8c to your computer and use it in GitHub Desktop.
// MQTT送信
var content = $"{{\"Temperature\":{Sht.Temperature.DegreesCelsius:F}, \"Humidity\":{Sht.Humidity.Percent:F},\"Pressure\":{Qmp.CalcPressureHectopascals():F}}}";
var isOK = Client.SendMessage(content, new CancellationTokenSource(2000).Token);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment