Skip to main content
Visitor II
February 3, 2020
Solved

How to login data hourly using STWIN sensor tile?

  • February 3, 2020
  • 1 reply
  • 891 views

I am trying to use STWIN sensor tile for logging the sensors data every 30 minutes, could anyone please help me how to modify codes in HS-datalogin?

    This topic has been closed for replies.
    Best answer by SimonePradolini

    HS_DataLog can stream sensor data via USB or store them into an SD Card.

    When using the SD Card, it is possible to select between the "continuous" or the "intermittent" modes just by changing the HSD_SD_LOGGING_MODE define in main.h file.

    Continuous Mode

      #define HSD_SD_LOGGING_MODE    HSD_SD_LOGGING_MODE_CONTINUOUS

    Press the USR button to start and stop the acquisition.

    Data are stored in a single folder, one single file for each sensor for the complete duration of the acquisition.

    Intermittent Mode

      #define HSD_SD_LOGGING_MODE    HSD_SD_LOGGING_MODE_INTERMITTENT 

    The acquisition can be started/stopped by pressing the USR button.

    In this case the acquisition is not continuous and for each cycle:

    1- A new folder is created (STWIN_###)

    2- Data are stored in the new folder, one file for each sensor. The acquisition lasts for the amount of seconds defined by the user --> HSD_LOGGING_TIME_SECONDS_ACTIVE

    3- The acquisition is then paused for the amount of seconds defined by the user --> HSD_LOGGING_TIME_SECONDS_IDLE

    4- back to step 1

    The duty cycle parameters can be changed in sdcard_manager.h file:

    #if (HSD_SD_LOGGING_MODE == HSD_SD_LOGGING_MODE_INTERMITTENT)

     /* Define the duty cycle of the data logging */

     #define HSD_LOGGING_TIME_SECONDS_IDLE    5                              

     #define HSD_LOGGING_TIME_SECONDS_ACTIVE  (15*60 - HSD_LOGGING_TIME_SECONDS_IDLE)  

    #endif

    Hope it helps

    Regards

    1 reply

    Technical Moderator
    February 24, 2020

    HS_DataLog can stream sensor data via USB or store them into an SD Card.

    When using the SD Card, it is possible to select between the "continuous" or the "intermittent" modes just by changing the HSD_SD_LOGGING_MODE define in main.h file.

    Continuous Mode

      #define HSD_SD_LOGGING_MODE    HSD_SD_LOGGING_MODE_CONTINUOUS

    Press the USR button to start and stop the acquisition.

    Data are stored in a single folder, one single file for each sensor for the complete duration of the acquisition.

    Intermittent Mode

      #define HSD_SD_LOGGING_MODE    HSD_SD_LOGGING_MODE_INTERMITTENT 

    The acquisition can be started/stopped by pressing the USR button.

    In this case the acquisition is not continuous and for each cycle:

    1- A new folder is created (STWIN_###)

    2- Data are stored in the new folder, one file for each sensor. The acquisition lasts for the amount of seconds defined by the user --> HSD_LOGGING_TIME_SECONDS_ACTIVE

    3- The acquisition is then paused for the amount of seconds defined by the user --> HSD_LOGGING_TIME_SECONDS_IDLE

    4- back to step 1

    The duty cycle parameters can be changed in sdcard_manager.h file:

    #if (HSD_SD_LOGGING_MODE == HSD_SD_LOGGING_MODE_INTERMITTENT)

     /* Define the duty cycle of the data logging */

     #define HSD_LOGGING_TIME_SECONDS_IDLE    5                              

     #define HSD_LOGGING_TIME_SECONDS_ACTIVE  (15*60 - HSD_LOGGING_TIME_SECONDS_IDLE)  

    #endif

    Hope it helps

    Regards

    Mrahm.1Author
    Visitor II
    February 26, 2020

    Thank you very much... it is working very well. the problem solved. Also in the similar way I found  #define  Autosave which is already in the main.h .. therefor I just changed the logging and pause times in the Autosave definition .

    Best regards,