Build a Weather Station with Raspberry PI and Sourcekit Atiic
Sourcekit® Atiic is an universal i2c to serial bridge. Atiic means AT commands to operate i2c devices. Check i2c.ninja to see how its AT command sets work.

PC - USB - USB-TTL - Atiic - i2c sensors (SPL06 and AHT21)
Core Instructions
Flash an micro SD card with latest 64-bit Raspberry OS Lite and get it running, Raspberry Pi 3B (RAM 1GB) should be enough in this application.
Install docker, reference: https://docs.docker.com/engine/install/debian/
- sudo usermod -a -G docker pi
- append
cgroup_enable=memoryin/boot/cmdline.txt - system reboot
Install grafana-oss
- sudo mkdir -p /var/lib/grafana /var/lib/atiic
- sudo chown 472 /var/lib/grafana
docker run -d -p 3000:3000 -v /var/lib/grafana:/var/lib/grafana -v /var/lib/atiic:/var/lib/atiic:ro --name=grafana --restart=unless-stopped grafana/grafana-oss:8.5.0
Install aguegu/Atiic
docker run -d --name=atiic --restart=unless-stopped --privileged=true -v /var/lib/atiic:/var/lib/atiic -v /dev:/dev -v /run/udev:/run/udev:ro aguegu/atiic:develop-arm64v8
Configure grafana
- Visit http://raspberrypi.local:3000 and login with admin/admin
- In menu
Server Admin / Pluginsinstallsqlite - Configure a SQLite datasource, and click
Save & Test- Name: Atiic
- Path: /var/lib/atiic/database.SQLite
- Go to menu
Dashboardsand create an new Dashboard - Create a dashboard with SQL:
SELECT avg(aht21Humidity), max(ts) as _ts FROM atiic WHERE ts >= ${__from:date:seconds} AND ts < ${__to:date:seconds} group by (1000*ts/$__interval_ms)Tweak the dashboard to the style you prefer. You may import new dashboard with this json file to get this:

Data Fields
- ts: INTEGER PRIMARY KEY, unix timestamp in seconds
- spl06Temperature: REAL, Temperature reading from SPL06, unit Celsius (°C)
- spl06Pressure: REAL, Air Pressure reading from SPL06, unit Pascal (Pa)
- aht21Temperature: REAL, Temperature reading from AHT21, unit Celsius (°C)
- aht21Humidity: REAL, Relative Humidity reading from AHT21, unit 100%
- ttl: INTEGER, measurement duration, unit milliseconds (ms)