Help with freezing OLED display

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

Help with freezing OLED display

Post by MaxZ »

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 217 times
Can somebody help me to find the fault please?

Cheers,
Max.
MaxZ
Posts: 330
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Help with freezing OLED display

Post by MaxZ »

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: 330
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Help with freezing OLED display

Post by MaxZ »

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: 330
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Help with freezing OLED display

Post by MaxZ »

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