Dear Experts,
My UNO R3 alone works fine reading and sending 6 analog channels (6 Potis, different voltages).
The Datalogger from Ada has also the extra pins (31 + 32) for SDA and SCL. So I hoped it could collect 6 ADC channels (serial as well on the SD-card). With channel A0, A2 and A3 it worked. But not more!
As soon as I connect the shield, A4 is switched as an output, A5 probably will 'make a SCL', and depending on the libraries A1 drfts away as getting signal by crosstalk only.
I tried the CD library from the IDE 1.8.1 version as well as the CD-master from Ada (renamed and replaced).
/*
send6data.ino
original scetch from Eric Ayars, 7/31/11
Version 2/12/17 from Heinz Kousek - not working properly on A1,A4 and A5
Using UNO R3 and DataLogger 'B' from Ada, I2C should work on pin 31+32
tried to read all 5 analog channels - not successful
Trigger by sending a LF from Serial Monitor (10 Lines) does
Output consists of individual lines containing millis() and raw A/D
conversions.
*/
#include <SD.h> // tested 1.8.1 | Ada (from SD-master)
#include <Wire.h> // all includes tested ON | commented
#include <RTClib.h>
RTC_PCF8523 rtc;
int Delay = 100; // between readout lines
int An; // AI's finally 0 to 5
int Wert; // ADC-Wert
int received; // characters received
char buffer[10]; // input buffer
int N; // how many measurements to make
char temp;
boolean done = false;
void setup() {
pinMode(A1,INPUT);
Serial.begin(57600);
}
void loop() {
received = 0;
buffer[received] = '\0';
temp = ' ';
done = false;
// Check input on serial line.
while (!done) {
if (Serial.available()) { // Something is in the buffer
N = Serial.read(); // so get the number byte
done = true;
}
}
// Now we know how many to get, so get them.
for (byte j=0;j<N;j++) {
Serial.print(millis(), DEC);
Serial.print('\t');
for (An = 0; An < 6; An++) {
Wert = analogRead(An);
Serial.print(Wert);
Serial.print('\t');
}
Serial.print('\n');
delay(Delay);
}
}