View Single Post
Old 06-11-2011, 09:21 AM   #702 (permalink)
eimix
EcoModding Lurker
 
Join Date: Aug 2010
Location: Lithuania
Posts: 74
Thanks: 3
Thanked 21 Times in 15 Posts
Quote:
Originally Posted by dar View Post
With LCD is everything O.K. I moved 12->2, 13->3 and and code was changed - it works with version 193 without SDcard support.
I don't know that it is, but can't upload v. 194 (with SDcard support)to the arduino board from PC.
Did you added FileLogger folder into arduino's "libraries" folder?

I tested some of code, it has problems if
#define useSDCard
is commented.

to disble SD card
row: "#define useSDCard" has to be deleted and
section: "#ifdef useSDCard" has to be deleted too:

Code:
#ifdef useSDCard
  // NOTE: some cards must be formated with not Windows, 
  // but http://panasonic.jp/support/global/cs/sd/download/index.html or others.
  
  // http://code.google.com/p/arduino-filelogger/
  #include <FileLogger.h>
  
  // PIDs and data collections goes to "data.log"
  //#define logEveryPid
  #define logDataCollections
  
  // Summary goes to "summary.log" (must be created in SD card but space for data log has to be continuous)
  #define logTripSummary

  // Choose only one type and at least one
  // Type logTypeSystem is more compact, uses less memory, 
  // but need some additional application for analizing
  //#define logTypeVerbose
  #define logTypeSystem
  
  // for faster writing need buffer, bigger is better, but 512 is maximum
  // if memory ussage is too big - reduce size
  #define logBufferSize 256
  static char logString[logBufferSize] = {0};

  
  // Need to change LCD data pins 12 and 13 (rewire also)
  #define LCD_DATA3 2
  #define LCD_DATA4 3
  
  // wiring instructions:
  // http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206874649/all
  // SCK_PIN   13 <-> SD 5 SCK    DIVIDER (1.8kOhm, 3.3kOhm) or (2.2kOhm, 3.9kOhm) or similar
  // MISO_PIN  12 <-> SD 7 DO     DIRECT
  // MOSI_PIN  11 <-> SD 2 DI     DIVIDER (1.8kOhm, 3.3kOhm) or (2.2kOhm, 3.9kOhm) or similar
  // SS_PIN    10 <-> SD 1 CS     DIVIDER (1.8kOhm, 3.3kOhm) or (2.2kOhm, 3.9kOhm) or similar
  // 3.3V         <-> SD 4 VCC    DIRECT
  // GND          <-> SD 3 GND    DIRECT
  // GND          <-> SD 6 GND1   DIRECT
#endif
#ifdef useSDCard
does not works as expected and compilation error about "byte" type rises in some mistirious cases.
do not know why
  Reply With Quote