Integration of hardware using UiFlow2
First, this page describes the assembly of a customised environmental sensor device containing auto-calibrated sensors that can provide digital readouts of local carbon dioxide (CO2) concentration, incident light flux, ambient temperature and atmospheric humidity. This type of information is particularly relevant for monitoring plant growth. Quantitative readouts are available directly, and can be used to integrate a picture of local conditions and inform controllers. The choice of sensors matches existing software support in the M5Stack ecosystem, and the device is mounted on a Grove breadboard that is electrically compatible with most M5Stack controllers.
Second, I show how the sensor device can be easily integrated with a variety of M5Stack controllers. One of the main advantages of using the M5Stack system for rapid prototyping - is the availability of a unified and integrated development platform, UiFlow2. This provides a dual platform for co-development of code through a Blockly-based graphical interface, with simultaneous assembly of the underlying Micropython code. It also provides integrated support for the M5Stack hardware, where an initial description of the hardware setup automatically provides access to the correct software libraries, including adjustment of underlying port addresses and hardware features that can differ between various devices. The UiFlow2 platform also provides a seamless drag-and-drop interface for designing graphical user interfaces and implementing touchscreen interactions. Different screen formats are automatically accommodated. The UiFlow2 environment is implemented as an online web interface, and code can be downloaded via USB or WiFi for testing. This fast and direct form of interaction makes debugging and testing of modifications relatively simple, and excellent way to learn.
As examples, the same environmental sensor device was operated with the following M5Stack devices: the tiny StickS3 (smaller than the sensor board) with minimal display; the Stopwatch with bright watchface-like display and physical buttons; the highly expandable CoreS3; the Cardputer Advanced with micro-keyboard; and the Tab5 with higher resolution screen and tablet-like format. The sensor device could be plugged into the Grove ports available on all of these devices and UiFlow2 allowed simple programming for parameter retrieval, display - and data plotting for those devices where the screen allowed.
Custom-built environmental sensor


M5Stack StickS3






M5Stack Stopwatch










M5Stack CoreS3








M5Stack Cardputer Adv






M5Stack Tab5







biomaker.org
