polish readme.md
This commit is contained in:
parent
e6f4e26d73
commit
01745f0049
19
README.md
19
README.md
@ -218,11 +218,11 @@ This describes how to set up a mobile PaxCounter:<br> Follow all steps so far fo
|
||||
|
||||
# SD-card
|
||||
|
||||
Data can be stored on an SD-card if the board has SD-card slot. To enable this feature, specify the board's SD interface and it's pins in the board's hal file (src/hal/<board.h>):
|
||||
Data can be stored on SD-card if the board provides an SD card interface, either with SPI or MMC mode. To enable this feature, specify interface mode and hardware pins in board's hal file (src/hal/<board.h>):
|
||||
|
||||
#define HAS_SDCARD 1 // SD-card-reader/writer, using SPI interface
|
||||
#define HAS_SDCARD 1 // SD-card interface, using SPI mode
|
||||
OR
|
||||
#define HAS_SDCARD 2 // SD-card-reader/writer, using SDMMC interface
|
||||
#define HAS_SDCARD 2 // SD-card interface, using MMC mode
|
||||
|
||||
// Pins for SPI interface
|
||||
#define SDCARD_CS (13) // fill in the correct numbers for your board
|
||||
@ -230,15 +230,16 @@ Data can be stored on an SD-card if the board has SD-card slot. To enable this f
|
||||
#define SDCARD_MISO (2)
|
||||
#define SDCARD_SCLK (14)
|
||||
|
||||
This is an example of a board with SD-card: https://www.aliexpress.com/item/32990008126.html
|
||||
For this board use file src/hal/ttgov21new.h and add the lines given above.
|
||||
This is an example of a board with MMC SD-card interface: https://www.aliexpress.com/item/32915894264.html. For this board use file src/hal/ttgov21new.h and add the lines given above.
|
||||
|
||||
Another approach would be this tiny board: https://www.aliexpress.com/item/32424558182.html (needs 5V).
|
||||
In this case you choose the correct file for your ESP32-board in the src/hal-directory and add the lines given above to the correct h-file. Please correct the numbers given in the example to the numbers used corresponding to your wiring.
|
||||
In this case you choose the correct file for your ESP32-board in the src/hal-directory and add the lines given above. Edit the pin numbers given in the example, according to your wiring.
|
||||
|
||||
Data is written to a single file and after 3 write-operations the data is flushed to the disk to minimize flash write cycles. Thus, up to the last 3 records of data will get lost when the PAXCOUNTER looses power.
|
||||
Data is written on SD-card to a single file. After 3 write operations the data is flushed to the disk to minimize flash write cycles. Thus, up to the last 3 records of data will get lost when the PAXCOUNTER looses power during operation.
|
||||
|
||||
Format of the file is CSV, thus easy import in LibreOffice, Excel, Influx, etc. Each record contains timestamp (ISO8601), paxcount (wifi and ble) and battery voltage (optional). Voltage is logged, if the device has a battery voltage sensor (to be configure in board hal file).
|
||||
Format of the resulting file is CSV, thus easy import in LibreOffice, Excel, Influx, etc. Each record contains timestamp (in ISO8601 format), paxcount (wifi and ble) and battery voltage (optional). Voltage is logged if the device has a battery voltage sensor (to be configured in board hal file).
|
||||
|
||||
File contents example:
|
||||
|
||||
timestamp,wifi,ble[,voltage]
|
||||
2022-01-30T21:12:41Z,11,25[,4100]
|
||||
@ -246,7 +247,7 @@ Format of the file is CSV, thus easy import in LibreOffice, Excel, Influx, etc.
|
||||
2022-01-30T21:16:08Z,12,26[,4102]
|
||||
2022-01-30T21:17:52Z,11,26[,4076]
|
||||
|
||||
If you want to change this please look into src/sdcard.cpp and include/sdcard.h.
|
||||
If you want to change this, modify src/sdcard.cpp and include/sdcard.h.
|
||||
|
||||
# Integration into "The Things Stack Community Edition" aka "The Things Stack V3"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user