Help with freezing OLED display

Examples, screenshots, graphics, fonts...
Post Reply
MaxZ
Posts: 231
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Help with freezing OLED display

Post by MaxZ » 06 Jan 2020, 11:45

Hi all,
For the last couple of days I have been struggling with a pulse analyser with a 128x64 OLED display, based on the sketch that Phil published with a bit of code added by me to measure the supply voltage. I tested it with my Uno on a bread board setup, and all was fine. Now I have built a permanent setup, using a ProMini board, and programming it with Usbasp. Programming does not generate any errors, but the OLED freezes after a while, varying from right away to about 10 seconds. I have at one point integrated a blinking led to see if it was the board itself, but it wasn't, it's just the display that freezes.
Here is my sketch. I added a voltage divider between Vcc and A2, reading at A3:
Oled_pulse_Voltage_meter_ProMini.ino
(1.52 KiB) Downloaded 37 times
Can somebody help me to find the fault please?

Cheers,
Max.

MaxZ
Posts: 231
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Help with freezing OLED display

Post by MaxZ » 06 Jan 2020, 12:53

Phil_G wrote:
06 Jan 2020, 12:45
Did you add the I2C pull-up resistors Max? not critical, 1k to 10k ish
Sometimes I2C devices have a link to enable on-board resistors
Hi Phil,
No I did not. Should these be external resistors or can I somehow define A4 and A5 as such?

MaxZ
Posts: 231
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Help with freezing OLED display

Post by MaxZ » 06 Jan 2020, 13:51

I installed the pullup resistors on A4 and A5, and the display does not freeze anymore. Thanks Phil!

Cheers,
Max.
Last edited by MaxZ on 07 Jan 2020, 08:27, edited 1 time in total.

MaxZ
Posts: 231
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Help with freezing OLED display

Post by MaxZ » 07 Jan 2020, 07:20

I removed all non-relevant issues/mistakes.
Cheers,
Max.

Post Reply