Putting it all together!
Here is the complete sketch for the Adafruit Sous Vide Controller
You can also get the latest code (which may have updates or improvements) from Github at
https://github.com/adafruit/Sous_Viduino (http://adafru.it/ceU)
//-------------------------------------------------------------------
//
// Sous Vide Controller
// Bill Earl - for Adafruit Industries
//
// Based on the Arduino PID and PID AutoTune Libraries
// by Brett Beauregard
//------------------------------------------------------------------
// PID Library
#include <PID_v1.h>
#include <PID_AutoTune_v0.h>
// Libraries for the Adafruit RGB/LCD Shield
#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>
// Libraries for the DS18B20 Temperature Sensor
#include <OneWire.h>
#include <DallasTemperature.h>
// So we can save and retrieve settings
#include <EEPROM.h>
// ************************************************
// Pin definitions
// ************************************************
// Output Relay
#define RelayPin 7
// One-Wire Temperature Sensor
// (Use GPIO pins for power/ground to simplify the wiring)
#define ONE_WIRE_BUS 2
#define ONE_WIRE_PWR 3
#define ONE_WIRE_GND 4
// ************************************************
// PID Variables and constants
// ************************************************
//Define Variables we'll be connecting to
double Setpoint;
Commentaires sur ces manuels