This is a simple Lua script example for GGreg20_V3 / GGreg20_V1 ionizing radiation detector module with SBM-20 GM tube working under NodeMCU firmware on ESP32 / ESP8266
This script is based on alterstrategy.lab (c) RadCounter - a full fledged LUA driver library module for radiation pulse counters under NodeMCU firmware.
Developed in 2022 by IoT-devices LLC, Kyiv, Ukraine with special alterstrategy.lab permission
This opensource free example code is licensed under: Apache 2.0 License
To get results:
- Run the script
dofile('ggreg20_v3_nodemcu_firmware_lua_example.lua')
- Run init() function with parameters
init(3, 1, 60000)
- Wait for 1 minute (after first pulse from GGreg20_V3) OR just run read() function to get current values
read()
-- or:
ma5_rad_lvl, cpm, minutes = read()
If you want to obtain ready-to-use and well commented Lua code with:
- debug output mode,
- calculation of minimum / maximum instantaneous levels,
- accumulated dose of radiation,
- low-pass and hi-pass debounce filtering,
- UNKNOWN / NORMAL / HIGH / DANGER event handling
as a complete Lua module with public methods registration, you may find it here: https://alterstrategy.com/product/radcounter/
https://hackaday.io/project/183103-ggreg20v3-ionizing-radiation-detector