Back to Smartcitizen.me

How can I use the SD-card?

Dear Community,
I can see in the code, that the SD-Card is uncommented.
Why?
How can I make best use of it? (e.g.: to save battery power)
Klaus

I tried to enable the SD-card (setting the vaiable to true via #define in the sketch, sorry I don’t remember the name of the variable, I’m not at home now!) but then when compiling I had the error: program too big!
Probably you need to disable some other features (debugging, wifly update …)

Stefano

Please,

follow this steps:

  1. Download the latest version of the firmware here.
  2. Download and install the Arduino IDE if you haven't. here.
  3. Your kit is ready to start logging data.

Extras

  • Log interval: By default it will log data once a minute, you can change this on the Constants.h tab on the Arduino IDE.

    `#define DEFAULT_TIME_UPDATE "60" `



  • Real Time Clock: Your kit has an internal RTC (Real Time Clock) to set a timestamp on each reading. To have your kit clock setup just set it up to connect to your Wi-Fi as usual before starting the setup process above. This will sync your kit time with our time server. In case you want your kit to preserve the time when you turn it off or your battery level goes down set also a CR1220 Coin Cell on the coin cell holder.

We are working on improving this process to make it seamless. Currently it is a little bit of an advance feature but also a great opportunity for getting familiar with Arduino and dataloggers.

Guillem.

Thank you @guillem! I love your style! ;p

Dear @guillem,
thank you - I’ll check it out…
Klaus

Since I seem to have issues with the WI-FI this seems to be an alternative way to still participate in the project. If I’m able to start collecting data to the SD card how can I send that to the website?

Hello Artsa,

we have plans on implementing an on-line tool for uploading the csv files stored on your SD card to the platform. In the meanwhile you can send as your csv file to support@smartcitizen.me and we will upload it for you.

Thanks,

Guillem.

Hi @artsa! What kind of problems do you have with the wi-fi!? Do you think that your WiFly could be corrupted!? We could make a test to check this! Best. :slight_smile:

Hi @aitoraloa!

I wrote about my issues in the “wifly-module-problems-some-connectivity-issues” thread. In addition to those I think my kit is now totally bricked.

In order to try to debug the situation I pulled up Arduino IDE from arduino.cc and pulled the latest kit SW from github. I tried to switch on the debugging module and thought as the issues are with the connectivity part I can switch off the sensors module. After uploading the sketch I lost the com port where the kit was and I haven’t found a way to get it to reconnect.

The blue LEDs are still flashing and I can connect to the wi-fi module’s own network and so am able now to access the terminal and web settings. I can set manually all the correct settings for my home wireless but the kit isn’t connecting. Even thought I had the latest SW on the kit the wi-fi sw stayed at version 400. I also noticed that my configuration file had size -1 so some issues there.

I have been trying to revive the board by Burning the Bootloader with no success. Any hints on how to get back to measuring and participating?

A step towards better things!

Some further googling revealed that in a case like this pressing the reset switch twise in a rapid succession after starting the sketch upload will activate the bootloader on the board (http://arduino.cc/en/Guide/ArduinoLilyPadUSB).

Now I have access to my kit but it’s still not communicating even though I once again updated the kit via the website.

<WEB_APP-1.06> ls

FL# SIZ FLAGS
2 86328 23 wifly-GSX-400
4 74920 3 web_app-GSX-106
7 46632 3 wps_app-GSX-131
9 66240 3 eap_app-GSX-101
11 37282 0 web_config.html
21 512 0 link.html
22 -1 10 config

171 Free, Boot=2, Backup=2

<WEB_APP-1.06>

(Yes, I deleted the logo.png just to see if the issue was with free space)

I got my kit to store recordings on the SD card but as I don’t have a wi-fi connection I can’t reach your NTP server. That leads me to have my measurements timestamped to Jan 1st 2000. Any ideas how to fix the clock?

It also seems that if I turn off the kit to extract the csv file the clock is reset to midnight on Jan 1st 2000. While I don’t have the battery to keep the time what wuold be a good process to extract data and keep the time at least to a known interval from the correct time so that I can correct it before sending it to you?

  1. Take out SD card
  2. email data
  3. return card
  4. click on reset button

Would that keep the time from resetting?

I would like to record data overnight, when there will not be any WiFi network available. So, I tried enabling the SD card in sck_beta_v0_8_6.ino

#define SDEnabled true

When I compile it, I get the error :

Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.

That’s exactly what Klabauter101 asked above, but I don’t see a working solution/answer yet.
Following guillem’s steps listed above doesn’t help.

Anool

Use sck_beta_v0_8_6_SDCARD is a version optimized only for the use of SD card.

Hi mdeheras,

SO, I guess the SD Card version disables WiFi functionality - is that correct ?
I can try, but it’s not the ideal situation. I will have to swap between the Arduino sketches every day.
Especially since it is so difficult to insert/remove the SD card with the acrylic cover installed.
I wish the uSD card socket was a more user friendly spring latched push in - pop-out style.

Anool

The SD card and WIFI can not at once, there is not enough space in program memory.