KaeptnBalu / Arduino_Spot_Welder_V3

GNU General Public License v3.0
201 stars 70 forks source link

V3.2.3: deprecated OLED constructor makes pin 4 unusable #3

Open crteensy opened 5 years ago

crteensy commented 5 years ago

I designed a custom top PCB with an arduino pro mini, and used pin 4 for one of the encoder inputs. That didn't work out of the box, because pin 4 appeared to be stuck high. It's not used in the schematic and also not defined in the header block with pin numbers. This was hard to track down, but:

The constructor used for the OLED display is deprecated (as per adafruit's documentation). It uses a reset pin, and the reset pin is defined as pin 4 in the OLED part of the spot welder header file (you don't have the bare source file in the repo so I can't link to it).

The correct constructor to use is: Adafruit_SSD1306 display(128, 64, &Wire); /**< OLED display object */

And the reset pin definition can be removed: //#define OLED_RESET 4 /*< OLED mode /