Smart Citizen Kit firmware for SD
Smart Citizen Kit SD firmware version for the Ambient Sensor Board.
This firmware is aimed to people wanting to log data in off-line mode, without internet connectivity, storing data on the built-in micro SD.
microSD: We recomend formating micro SD cards using the official SD tool you can download here.
RTC: Place a CR1220 cell battery on your kit. Before uploading the SD firmware use the on-line configuration tool at smartcitizen.me to set your Wi-Fi credentials. Your kit will connect to the internet and sync its the internal clock with our remote servers.
You can now install the SD firmware using the Arduino IDE. Ready!
The firmware is totally compatible with Arduino. You can upload the firmware using the Arduino IDE.
In order to compile and upload the firmware you will need to install the SdFat library for Arduino.
For SmartCitizen Kit version 1.0 select
Tools/Boards/Arduino Leonardoon the Arduino IDE (ATmega 32U4 at 16Mhz)
For SmartCitizen Kit version 1.1 select
Tools/Boards/Lylipad Arduino USBon the Arduino IDE (ATmega 32U4 at 8Mhz)
##SD data format
When using the SD firmware on the SCK, data is stored as CSV (comma separated) file on the SD card.
This is an example of the output file once opened on a spreadsheet application:
You can import the recorded data in to smartcitizen.me.
In your device page you will find the Import SD along with the Edit and Configure options.
Using a microSD card reader get the post.csv file from your card, select it and click import. Data will be imported in to your device, data existing on the file already imported will be skipped. Your kit should be running the latest SD firmware and the SCK time (RTC) should be set in order data can be imported.
The data stored is automatically converted to the proper units in firmware.
If you prefer to do the conversions manually set
DataRaw false in the
Constants.h file and apply the formulas on the following table:
|0||Temperature||ºC||T = -53 + 175.72 / 65536.0 * ( Traw * 10 )|
|1||Humidity||%Rel||H = 7 + 125.0 / 65536.0 * ( Hraw * 10 )|
|2||Light||Lux||L = Lraw / 10|
|7||Noise||dB||Apply the conversion table from mV to dB: CSV|