Skip to content

Programflow & Data

S1mKu edited this page Jun 12, 2019 · 4 revisions

setup:

  • SD
  • sensors
    • moisture
    • ...
  • LED Matrix
  • LCD
  • WSRCycle (sleep mode & timed interrupt)
  • (BLE)
  • (status LED)

loop:

  • WSRCycle (Work Sleep Repeat Cycle -> every 5 to 10 minutes) -> decide on whether to proceed immediately or enter sleep mode
  • read sensor data
  • store data on SD card
  • display data & smiley (LCD & LED Matrix)
  • (play sound)
  • (status LED)

Data

struct has to be of 'static'/fixed size

typedef struct DataEntity {

  • sensor data
  • time
  • num of skipped WSRCycles }

Sleep mode & interrupts

  • determine what sleep mode to use and what timers, ADC, etc. can be shut down -> measure power consumption
  • timed interrupt from RTC wakes up the Arduino from sleep mode -> how does the RTC SQW/INT work / when is it activated -> read datasheet

Clone this wiki locally