SamusAranX / ThermoServer

A small program that serves BM**80 sensor info as JSON

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ThermoServer

This program was written for a Raspberry Pi using Pimoroni's BMP280 breakout. Chances are it'll also work with the BME280 and BME680, but those are untested.

Usage

On the server machine:

$ go get

$ go build -o thermoserver

$ ./thermoserver -H 0.0.0.0
2022/01/13 00:40:06 New reading
2022/01/13 00:40:06 Listening on <server IP>:27315…

From another machine on the network:

$ curl <server IP>:27315
{"temperature":18.18,"pressure":1018.5345703125,"updated":"2022-01-13 00:40:16"}

About

A small program that serves BM**80 sensor info as JSON

License:MIT License


Languages

Language:Go 100.0%