here's the code....
/*
EGT-monitor-v4
Version 4.0
This version extends version 3.0 by using all
the theromcouple lines and no serial port.
WORK IN PROGRESS!!!
Kevin Thomas, 24 Jan 2016
*/
#include <SPI.h>
#include "Adafruit_MAX31855.h"
#include <LiquidCrystal.h>
// defines what pins on the MAX31855 board connect to what pins
// on the Arduino board.
int MAX_SO = 6;
int MAX_CLK = 7;
int MAX_CS0 = 8;
int MAX_CS1 = 9;
int MAX_CS2 = 10;
int MAX_CS3 = 13;
// create four instances of the MAX31855 board, one for each
// thermocouple.
Adafruit_MAX31855 maxboard0(MAX_CLK, MAX_CS0, MAX_SO); // on pin 8
Adafruit_MAX31855 maxboard1(MAX_CLK, MAX_CS1, MAX_SO); // on pin 9
Adafruit_MAX31855 maxboard2(MAX_CLK, MAX_CS2, MAX_SO); // on pin 10
Adafruit_MAX31855 maxboard3(MAX_CLK, MAX_CS3, MAX_SO); // on pin 13
// create an instance of the LCD display.
LiquidCrystal lcd(12,11,5,4,3,2);
void setup()
{
lcd.begin(16, 2);
lcd.clear();
lcd.print(" EGT-monitor-v4");
delay(5000);
lcd.clear();
}
void loop()
{
int T1 = maxboard0.readCelsius();
int T2 = maxboard1.readCelsius();
int T3 = maxboard2.readCelsius();
int T4 = maxboard3.readCelsius();
// the lcd. (col/row format)
lcd.setCursor(0, 0);
lcd.print("T1= ");
lcd.setCursor(3, 0);
lcd.print(T1);
lcd.setCursor(9, 0);
lcd.print("T2= ");
lcd.setCursor(12,0);
lcd.print(T2);
lcd.setCursor(0, 1);
lcd.print("T3= ");
lcd.setCursor(3, 1);
lcd.print(T3);
lcd.setCursor(9, 1);
lcd.print("T4= ");
lcd.setCursor(12, 1);
lcd.print(T4);
delay(1000);
}
I don't have the hardware with me as I wrote the code for a fellow aviator.