-
Notifications
You must be signed in to change notification settings - Fork 5
File structure
Mitra Ardron edited this page Sep 23, 2025
·
2 revisions
The following conventions apply to node files in the FrugalIoT project, where exactly these directories appear will depend on whether you are developing an application or the frugal-iot library itself.
At the top level in Platform_IO you can put.a data directory, and use it to put configuration data to put on the device at flash time
- data A way to
- frugal-iot
- device_name Name of the device e.g.
SHT sensorthis can be overridden in the UX - project Name of the project this device will be installed at - e.g.
developersthis can be overridden in the UX
- device_name Name of the device e.g.
- wifi Holds one file per wifi that should be recognized
- foobar Filename is the SSID of the wifi access point, file contains one line which is the password
- sht One directory for each section, sensor, etc being configured
- temperature
- max Could set this to
100for example to change the maximum temperature showed in the UX for this device
- max Could set this to
- temperature
- frugal-iot
- note these are in structural, rather than alphabetical order
- examples
- sht30 One directory per example
- sht30.ino. The code that runs that example
- platformio,ini Configuration, and how to compile on different boards
- sht30 One directory per example
In the src directory there are 4 main groups of files, and a few individuals
- src
- _settings.h High level defines used across multiple modules - for example which languages to use. Also some board specific defines
- misc Some utility functions used in many places (like
StringF) - frugal_iot.h. Master .h file, most applications just include this, in order to get everything
The rest of the src files are in four groups.
- src
- actuator Outputs, turning things on or off etc in response to MQTT
- sensors Inputs, reading from the environment and sending to MQTT
- control Control, connect to inputs, and set outputs.
- system Everything to do with the overall platform - including
mqttwificaptiveetc
Groups
- src (most files have a .cpp and .h part)
- actuator Main class for actuators
- actuator_digital Main class for digital actuators - relays etc
- actuator_xxx Specific actuators, like
ledbuiltin - sensor Main class for sensors
- sensor_analog, float, ht, uint16. Classes that contain common functionality for groups of sensors, for example
floatis for those that return a float. - sensor_xxx Specific sensors e.g.
sht30orbh1750 - control Main class for anything that handles controls