lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello, list.

(This is update for project announced here 2019-12-14.)

In recent weeks I've reworked my project for GUI for DS3231 real-time
clock. DS3231 is just a piece of electronic about 2x4cm and less than
$2 cost. It has cell battery to keep tracking time off-line.

From PC user view, since it's using I2C protocol you can't just plug it
to USB port and read/write time in JSON or something. But you can plug
DS3231 to Arduino, plug Arduino to USB, load in Arduino code snippet
called Firmata and then you can read and write I2C bytes. Possible but
not easy.

Here comes my project.

It parses and compiles raw I2C data and provides common GUI to it. So
you can just type needed values and press save. As a bonus you'll know
temperature (device has thermometer for clock speed compensation).

GUI is rendered by TekUI (ty Timm for consultations). Firmata client
is implemented by me in Lua. So as raw device data parsing/compiling.

Lua shines here as it allows to convert stream of bytes to structured
table. And convert that table back to stream of bytes for device.

Project page: https://github.com/martin-eden/tekui_ds3231

-- Martin