I made a simple sketch for using the I2C IO Expander MCP23017 with a teensy 3.5 board.
Using Teensyduino v1.40 with Arduino IDE 1.8.5
The pullup resistors (4.7k) are OK.
After a short while (between 5s up to 2min) the expander stops working.
What's wrong?
Using Teensyduino v1.40 with Arduino IDE 1.8.5
The pullup resistors (4.7k) are OK.
After a short while (between 5s up to 2min) the expander stops working.
Code:
#include <Wire.h>
#include "Adafruit_MCP23017.h"
Adafruit_MCP23017 mcp;
void setup() {
mcp.begin(); // use default address 0
mcp.pinMode(6, OUTPUT);
mcp.pinMode(7, OUTPUT);
}
void loop() {
delay(500);
mcp.digitalWrite(6, HIGH);
mcp.digitalWrite(7, LOW);
delay(500);
mcp.digitalWrite(6, LOW);
mcp.digitalWrite(7, HIGH);
}
What's wrong?