Read and translate AHT20 sensor readings

This commit is contained in:
2024-09-03 22:42:10 +02:00
parent 83f6fa58a4
commit b9443f8cec
6 changed files with 225 additions and 196 deletions

View File

@@ -1,49 +1,10 @@
## Serial Interface
Instead of polling for input we use an interrupt vector
to write data to a rx ring buffer when it's available.
We parse commands using a state machine so we can deal
with small chunks of characters at a time and spit out
the parsed command when the transmission has finished.
NOTE: System clock frequency should be a multiple of
1.8432MHz for perfect USART. This means we would need
an external crystal oscillator.
### Supported Commands
## Supported Commands
- RUN
- STOP
- TEMP <num>
- DEWP <num>
- TEMP <float>
- DEWP <float>
Decimal point for numbers is currently not supported.
Make sure you have disabled hardware flow control on
the client side.
### Web Interface Example
There is an example https and websocket server (written
in Python) which serves a simple Javascript shell that
controls your box. Its main purpose is to give you a
demonstration on how you can write a custom bridge or
interface.
Check out the directory "/opt/webgui" under the project
root. You may need to run the following command to load
optional submodules if you can't see the webgui folder:
$ git submodule update --init
First you need to generate a self signed certificate to
ensure SSL encryption. Run the following command in the
webgui root directory:
$ ./configure
To manually start the server you can use the Makefile
(but it's recommended to run the server automatically
as a daemon when the host machine starts):
$ make run