siara-cc / sqlite_micro_logger_arduino Goto Github PK
View Code? Open in Web Editor NEWFast and Lean Sqlite database logger for Arduino UNO and above
License: Apache License 2.0
Fast and Lean Sqlite database logger for Arduino UNO and above
License: Apache License 2.0
Hello,
Thank you very much for the library, can I use this library on LittleFS? Can you please upload a simple example as you provided for sqlite3_littlefs?
Using this library on ESP32 I am able to write to both, however with LittleFS, the file size of the database seems to grow much larger than SPIFFS.
Each row contains 38 byte of data. And I am inserting rows until row id 62.
On SPIFFS the file size is 6506 bytes, on LittleFS the file size is 19456 bytes. Ideally I'd like to use LittleFS on account of the fact that SPIFFS is EOL, but those file sizes are prohibitive when using a partition on the ESP flash.
While saving I am saving the record with isSynced=0 and after the success response I want to modify it to isSynced=1 is it possible?
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
Running Uno-and-above-sdfat
on the MKR WiFi 1010 with an sd-card breakout hooked up to pin 7 as CS, always returns DBLOG_RES_READ_ERR
or better -7
(plus my clock adjustments)
When i recover the DB it seems that the write was successful, but it's not good, if it throws errors and a recover is required after each write.
(Tried SdFat version 2.0.6 and 1.1.4 (Here the timestamp-parsing behaved weird as well ๐คช) in case the recent changes f'd it up ... but no difference)
Does this library support re-opening the database without destroying existing data?? When i use dblog_write_init
all the data in existing databse are removed, am i doing something wrong?
Trying to use this with Texas instruments TIVA C and FatFs
Is there an example with FatFs?
If I use fp = fopen("dbfile.db", "r+b");
Could I init both a dblog_write_context
and dblog_read_context
at the same time? If possible, what are the possible consequences?
Since the api is c based I was wondering if i can use this library in the AI Thinker A9/A9G Development board. It has a build in TF Card Slot and its SDK is totally c based.
First of all, thank you for providing this library! It's almost exactly what I'm looking for, but one thing I couldn't find out is how to deal with deleting log rows that are older than a certain amount of days and at the same time freeing the space taken up by these entries, much like the DELETE and VACUUM statements in sqlite3.
Or is there any other way I could deal with the fact that I just want x days worth of data in the database without creating new database files every x days?
When using the sdfat sample the code reports failure until you decrease the clock speed of the SD card.
This is an issue discussed here as well.
My board: Arduino MKR Wifi 1010
Example: Uno_and_above_SdFat
changing l.435
in Uno_and_above_SdFat.ino
from
if (!SD.begin(SD_CS_PIN)) {
to
if (!SD.begin(SD_CS_PIN, SD_SCK_MHZ(12))) {
fixed it for me.
The SdFat-QuickStart even uses only 4 MHz
.
rc = db_exec(db1, "INSERT INTO test1 VALUES (1,1);");
by this insert 1(hardcoded) in column in table but,
int i=4;
how to insert variable i in table
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.