OLED hang on Arduino Nano
On my 6 Channel Remote Control project, I discovered it hang at random time within ~15 minutes. Accidentally I discovered that it will immediately hang when I touch the I2C line (SDA, SCK). Another observation is the OLED is glitching randomly. Initially I though it is separate issue but the solution for hang also solve the glitching. (1) At first I though maybe because of noisy power supply causing the microcontroller to hang. So I add 100uF capacitor on the 5V. It does help, still hang (2) Since it was immediately hang when I touch the SDA/SCK, maybe by touching I'm adding capacitive load, slowing down I2C signal and causing communication error to OLED. I add 4.7K pull-up resistor to increase rise time but it make it worst, the remote control hang immediately after displaying welcome message on OLED even without touching SDA/SCL 😱. Not a clue what going on, I hook up oscilloscope and see something interesting. There are 2 clocks frequency during communication, 99kHz on the left...