Giter Site home page Giter Site logo

hsplatform's Introduction

This is a - development in process - template for a ESP32 based modulat sensor software.

Main development ideas:

  • There are several types of tasks, e.g.:
    • sensor read (temp/humidity, air quality, bat activity...)
    • send information, LoRa, WiFi
    • actuator tasks, e.g. switch power on/off on certain circuit if battery voltage is high/low
    • utility tasks, e.g. read time from ntp-server, OTA software update
  • Next execution time of each task is stored in the global array (next_run_time) in the non-volatile memory
  • A task can set its' next execution time (next read in 60 secs) or it can be set by another task (e.g. sensor read can trigger LoRa transmit)
  • After processing all tasks due, the program goes to deep-sleep-state (if enabled) to save battery
  • Enabled tasks are selected (in settings.h) with preprocesser directives #define / #undef . This keep keep compiled package as compact as possible. Unfortunately makes source code harder to read.
  • Global variables (also task results) are stored in non-volatile memory (RTC_DATA_ATTR 4k) which keeps data during sleep periods.
  • Incomplete LoRa transmit blocks deep-sleep
  • In the loop-function tasks are executed, if they are due (next_run_time[task number] <= current time ) . Generally sensor tasks are before transmitting and actuator tasks (first we try to get all data in the memory)

hsplatform's People

Contributors

olli69 avatar aapris avatar

Watchers

 avatar James Cloos avatar Aki Salminen avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.