Add check in display code for pin mappings that use the i2c pins for other things
This commit is contained in:
parent
08254912de
commit
5f4a12736c
|
@ -7,6 +7,9 @@ Adafruit_SSD1306 display(pinDisplayReset);
|
||||||
|
|
||||||
void initialiseDisplay()
|
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)
|
switch(configPage1.displayType)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
|
Loading…
Reference in New Issue