I have 8xMAX31856 and I am trying to use the Adafruit library. Instead of writing all 8 thermocouple channels each time in code (and wasting memory), I want to store the objects in an array and loop through them periodically.
Here is my code:
Adafruit_MAX31856 TCouple1 = Adafruit_MAX31856(2,11,12,13);
Adafruit_MAX31856 TCouple2 = Adafruit_MAX31856(3,11,12,13);
Adafruit_MAX31856 TCouple3 = Adafruit_MAX31856(4,11,12,13);
Adafruit_MAX31856 TCouple4 = Adafruit_MAX31856(5,11,12,13);
Adafruit_MAX31856 TCouple5 = Adafruit_MAX31856(6,11,12,13);
Adafruit_MAX31856 TCouple6 = Adafruit_MAX31856(7,11,12,13);
Adafruit_MAX31856 TCouple7 = Adafruit_MAX31856(8,11,12,13);
Adafruit_MAX31856 TCouple8 = Adafruit_MAX31856(9,11,12,13);
char* thermocouples[] = {TCouple1, TCouple2, TCouple3, TCouple4, TCouple5, TCouple6, TCouple7, TCouple8};
however, I am met with this error on compile:
cannot convert 'Adafruit_MAX31856' to 'char*' in initialization
Why can I not store these variables in an array and call on them later? Is there another way to do this? They work on SPI logic...