From 5f4a12736ce3eeec53e1f3168ef494387377154b Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Wed, 6 May 2015 16:13:21 +1000 Subject: [PATCH] Add check in display code for pin mappings that use the i2c pins for other things --- display.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/display.ino b/display.ino index 600fba65..af198b77 100644 --- a/display.ino +++ b/display.ino @@ -7,6 +7,9 @@ Adafruit_SSD1306 display(pinDisplayReset); void initialiseDisplay() { + //Protection against older pin mappings where the crank/cam signals were on the SDA and SCL pins. This will cause the Arduino to lock hard if you try to initialise i2c devices when a crank signal is coming in + if(pinTrigger == 20 || pinTrigger == 21 || pinTrigger2 == 20 || pinTrigger2 == 21) { return; } + switch(configPage1.displayType) { case 1: