One error masking another.
If I comment out the call to the memory functions the problem is that is not finding the include file
Fading_serial.cpp:11:22: error: memdebug.h: No such file or directory
I don't see why it did not report that initial error before but blocked on an later error that was a consequence of failing the include.
#include <SD.h>
/*
sample ADC inputs 0-5 every 3s
-255 marks end of data.
monitor USB input for "d" command, then dump data to usb
Fade led on/off during each data cycle
*/
#define DEBUG
#include "memdebug.h"
int ledPin = 9; // LED connected to digital pin 9
byte cells[] = {A0,A1,A2,A3,A4,A5};
int const maxcell = 5;
int const samples = 270; // 6x341=2kB
int const NaN=-1;
int current = 0;
int sample = 0;
byte data[samples][maxcell+1];
char const sDump[] = "# ADC data dump from Arduino";
char const sSampling[] = "# sampling A0..A5 from pin:";
char const sSample_num[] = "# sample num=";
char const sChar_read[] = "char read";
void setup() {
// nothing happens in setup
Serial.begin(9600);
Serial.print(sSampling);
Serial.println(A0);
data [0][0] = NaN;
// getFreeMemory();
// showmem();
}
This would suggest that sketchbook directory (which is also the current directory on starting IDE) is not where the compilation is being run.
does arduino ''cd' somewhere else before calling avr-gcc ??