blh64:
You need to instantiate 3 shield objects, something like this: (untested)
#include <ExtendedADCShield.h>
#include <SPI.h>
// defualts for first board
const byte BOARD1_CONVST_PIN = 8;
const byte BOARD1_BUSY_PIN = 9;
const byte BOARD1_RD_PIN = 10;
// custom for second board
// connect to any Arduino pins
const byte BOARD2_CONVST_PIN = 2;
const byte BOARD2_BUSY_PIN = 3;
const byte BOARD2_RD_PIN = 4;
// custom for third board
// connect to any Arduino pins
const byte BOARD3_CONVST_PIN = 5;
const byte BOARD3_BUSY_PIN = 6;
const byte BOARD3_RD_PIN = 7;
//Initialize the ADC Shield with default pins and 16-bit ADC (LTC1859)
ExtendedADCShield extendedADCShield1(16); // default
ExtendedADCShield extendedADCShield2(BOARD2_CONVST_PIN, BOARD2_RD_PIN, BOARD2_BUSY_PIN, 16); // custom
ExtendedADCShield extendedADCShield3(BOARD3_CONVST_PIN, BOARD3_RD_PIN, BOARD3_BUSY_PIN, 16); // custom
float ch0, ch9, ch17;
void setup() {
SPI.begin();
//Throw out first read (junk data) and configure input 0 as single ended bipolar -5 to +5V
extendedADCShield1.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 1
extendedADCShield2.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 2
extendedADCShield3.analogReadConfigNext(0, SINGLE_ENDED, BIPOLAR, RANGE5V); //device 3
}
void loop() {
ch0 = extendedADCShield1.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 1
ch9 = extendedADCShield2.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 2
ch17 = extendedADCShield3.analogReadConfigNext(1, SINGLE_ENDED, UNIPOLAR, RANGE5V); //input 1 of device 3
}
Lovely, thank you so much. Thanks also vffgaston