mirror of
https://github.com/brendanhaines/kilncontroller.git
synced 2024-12-25 10:26:55 -07:00
adds all output pins
This commit is contained in:
parent
af4b6504a8
commit
2999af7df3
|
@ -12,6 +12,9 @@ MAX6675 t0(CLK0, CS0, MISO0);
|
|||
Adafruit_MCP23017 mcp;
|
||||
|
||||
void setup() {
|
||||
// Onboard LED
|
||||
pinMode(2,OUTPUT);
|
||||
|
||||
// I2C
|
||||
Wire.pins(4, 5);
|
||||
|
||||
|
@ -24,10 +27,20 @@ void setup() {
|
|||
|
||||
// MCP23017 GPIO expander
|
||||
mcp.begin();
|
||||
mcp.pinMode(8, OUTPUT);
|
||||
mcp.digitalWrite(8, HIGH);
|
||||
mcp.pinMode(0, OUTPUT);
|
||||
mcp.pinMode(1, OUTPUT);
|
||||
mcp.pinMode(2, OUTPUT);
|
||||
mcp.pinMode(3, OUTPUT);
|
||||
mcp.pinMode(4, OUTPUT);
|
||||
mcp.digitalWrite(0, HIGH);
|
||||
mcp.digitalWrite(1, HIGH);
|
||||
mcp.digitalWrite(2, HIGH);
|
||||
mcp.digitalWrite(3, HIGH);
|
||||
delay(100);
|
||||
mcp.digitalWrite(8, LOW);
|
||||
mcp.digitalWrite(0, LOW);
|
||||
mcp.digitalWrite(1, LOW);
|
||||
mcp.digitalWrite(2, LOW);
|
||||
mcp.digitalWrite(3, LOW);
|
||||
|
||||
// Clear LCD
|
||||
lcd.setCursor(0, 0);
|
||||
|
@ -41,5 +54,9 @@ void loop() {
|
|||
lcd.print("F ");
|
||||
lcd.print(t0.readCelsius());
|
||||
lcd.print("C");
|
||||
|
||||
digitalWrite(2, LOW);
|
||||
delay(100);
|
||||
digitalWrite(2, HIGH);
|
||||
delay(1000);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user