Skip to content

How to use it with ESP8266 #1

Open
@happytm

Description

@happytm

Hi Arun,

Thank you for creating excellent Database for micro controllers. I am working on small standalone IOT network and I was looking for local data storage solution for my project. I have 1 master esp8266 device collecting sensor data from multiple slave esp8266 devices and I would like to store these data to spiffs on master device.The data received by master from each slave is always a 6 byte array.There are always 3 arrays received from each slave device within 60 milliseconds. The array received is in following order & format:

array 1 - Sensor Types
Format - {36:06:16:26:36:46} where 36 is slave device ID and 06 means sensor type is voltage,16
means sensor type is temperature, 26 means sensor type is humidity and so on.

array 2 - sensor values
Format - {36:33:70:55:925:60} where 36 is slave device ID and 33 is voltage(3.3V),70 is teperature in
F, 55 is humidity inpercentage etc.

array 3 - device status
Format - {36:36:07:05:01:60} where 36 is slave device ID and 36 is last byte of device IP,07 is wifi
channel number, 05 is sleep time for slave device etc.

My code is at following links:

Master - https://github.com/happytm/BatteryNode/blob/master/ProbeReceiver.ino
Slave - https://github.com/happytm/BatteryNode/blob/master/ProbeSender.ino

My goal is to store all these data in spiffs by device ID and time it is received by master device.

I tried to figure out how to implement this but was not successful.

Also I wanted to overwrite spiffs data file when it is almost full (3 MB).

Please help me.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions