Fetch: Arduino Data Acquisition/Oscilloscope (Alpha2 Release)

Drl81,

I downloaded the code and used it with Ide 1.01 with success! I discovered a couple things that I think are notable.

1.) to datalog an analog value from an analogpin, you have to define a variable for the analog result before setup. Defining a variable in the loop() does not allow Arduino Fetch to see it???
2.) Your program does not seem to work with Arduino ERW which is a modified version of the Arduino IDE found in the other software section. (I know it is not supported by the Arduino group).
3.) A definition like "int led pin = 7; will show up as a possible choice for datalog even though it would possibly be referring to a digital pin number that is a constant but, just defined as int.

The code below gave me some nice graphs to look at. I hope to try more things when timed allows!

Thank you for sharing your hard work!

#include <DataLogger.h>
DataLogger datalogger;  // instantiate the DataLogger

// some basic test params
signed char sbyte_test = 0;  
float loop_time_ms, loop_period_ms;

int sensorValue;
int otherpin;
// initialization routine
void setup() 
{
  Serial.begin(SERIAL_BAUD); 
}

//background loop (aka "main" loop)
void loop() 
{  
  // timestamping
  static unsigned long loop_timestamp;
  unsigned long now = micros();  
  loop_period_ms = ((float)(now - loop_timestamp)) * 0.001f;
  loop_timestamp = now;  //store off prev val

  sbyte_test+=2;  // test parameter
  
  datalogger.ReceiveDAQParams(); // Receive serial data
  datalogger.SendDAQParams(); // Send data
   sensorValue = analogRead(A0);
   otherpin = analogRead(A1);
  // calculate loop time (not including delay at end)
  loop_time_ms =((float)(micros() - loop_timestamp)) * 0.001f;
  
  // wait some milliseconds to slow the sending of params
  delay(20);  // can be reduced as desired
}