Skip to content

siliconwitchery/s2-lua-examples

Repository files navigation

Lua examples

Sensor examples

Minimal starting points for individual sensors. Each one reads the sensor and sends the values to Superstack.

Name Description Sensor
adafruit_bmp280.lua Reads temperature and air pressure from a barometric sensor. BMP280 📖 🛍️
adafruit_ina237.lua Reads voltage, current, and power from a power monitor. INA237 📖 🛍️
adafruit_mcp9808.lua Reads temperature from a high accuracy temperature sensor. MCP9808 📖 🛍️
adafruit_mlx90393.lua Reads magnetic field strength in three axes (X, Y, Z). MLX90393 📖 🛍️
adafruit_vl53l0x.lua Measures distance using a laser time of flight sensor. VL53L0X 📖 🛍️
sparkfun_as7343.lua Reads light intensity across 12 wavelengths from a color sensor. AS7343 📖 🛍️
sparkfun_cap1203.lua Detects touches on three capacitive touch pads. CAP1203 📖 🛍️
sparkfun_vcnl4040.lua Measures ambient light. VCNL4040 📖 🛍️

Applications

Complete projects combining several devices, ready to adapt for real deployments.

Name Description Devices used
air-quality-monitor.lua An indoor air monitoring system that measures temperature, humidity, AQI, CO₂, and TVOC, and automatically controls a fan based on air quality levels. The data collected is sent to Superstack SHT45 📖 🛍️
ENS160 📖 🛍️
Relay 📖 🛍️
embedded-world-badge.lua A wearable conference badge featuring temperature and eCO₂ measurements, NFC functionality, and a transparent display. The data collected is sent to Superstack MCP9808 📖 🛍️
ST25DV16 📖 🛍️
ENS160 📖 🛍️
SSD1309 📖 🛍️
weather-station.lua A weather station that measures temperature, humidity, and barometric pressure, derives dew point and sea level pressure, and watches the pressure trend to forecast storms. The data collected is sent to Superstack SHT45 📖 🛍️
BMP280 📖 🛍️

About

Lua example snippets to help you get started with the S2 Module and Superstack

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages