Display fun

I wanted to use this nifty little display for my RPM display of the spindle on the CNC-Router. It somehow switched to a 128*32 mode.

Digging in the code, I found a problem (for me, in this sketch) Activating the 128*64 define in Adafruit_SSD1306.h library, fixed it.

Yes, of course, it (they) will go into the plane as well, that’s why I got them 😉

/*!
 * @file Adafruit_SSD1306.h
  * This is part of for Adafruit's SSD1306 library for monochrome
 * OLED displays: http://www.adafruit.com/category/63_98
 * Written by Limor Fried/Ladyada for Adafruit Industries,
 */

#ifndef _Adafruit_SSD1306_H_
#define _Adafruit_SSD1306_H_

// Note: my display only showed 32 lines, 
// changing this define to the one below
// cured the problem. Standard 'define SSD1306_128_32' is wrong. 
// Kees Blokland, 2 July 2020

// ONE of the following three lines must be #defined:
#define SSD1306_128_64
//#define SSD1306_128_32

Update: The better and proper way is to add the directives from the updated library in the source code:

Adafruit_SSD1306 display(128, 64, &Wire, 4); // This forces 128*64 display and a reset. Before it was:

Adafruit_SSD1306 display(4);

So the display is working, but values are jumping around too much. This is a known arduino limitation, and somewhere I have a library from ElectricRCAircraftGuy that solves the problem to a large extend.

Oh, and in the meantime the router motor has decided to stop. It did sound funny lately, more work! Usual case of ‘last night it worked, today it does not’. Using a Dremel for creating revolutions to count.

Yes the shed roof is still being worked on too, and so is the garden, and a myriad of urgent stuff…