Display 1 bit image on oled


#1

Hi,
I was wondering if there was a possibility to display graphics on an oled display (128x64) that is not from a scope or a string.

For example, I would like to show which algorithm is used in a DX7 patch, instead of displaying the full chart on a computer. I am not familiar with the way tables work. But with an analysis of the Xylobox patch, I see that it is possible to load .raw files that contains waveforms. So I thought it would be possible to draw simple graphs contained in such files and select them with the same midi cc that selects the algorithm.

Do you think it is possible?

example of an image to display:

PS: I've been on the main OLED topic, but I couldn't find a solution without a teensy or arduino, which seems a bit overkill for what I want to do.


#2

Good question, I have been trying to achieve that but so far, considering my poor coding skills, I only managed to DIY something out of what already exists.
I modified the existing font file by hand to draw parts of the graphics I want to display. For that i had to divide my graphic in a grid that represents the total amount of character the screen can display. For an example, one part of my graphic correspond to one character (a "lowercase" a for an example)
Not an ideal solution for complex menus but for an example, I managed to create a table tennis animation for a midi delay I programmed. Also a graphic loading screen for my boot patch.

.

If I can't find any other solution, my plan is to modify the existing object to be able to take one character that spans on the whole screen and draw my own graphics by hand on the resulting grid.


#3

I have not tried this myself, but when I was doing some research for Arduino OLED stuff, I found this page, which supposedly lets you convert any image to a byte array:

If you have Arduino IDE installed, you can install the SH1106 or the SDD1306 libraries to see how to use a bitmap/byte array on Arduino. Probably not gonna be the same for Axoloti, but it might get you started or give an idea what to do :slight_smile:


#4

Thank you both,
Starting with Arduino is a good idea as I already have some background with it. I will investigate further when I have the time (probably next week).


#5

Even though u8g2 seems to be the standard for OLEDs and the Arduino IDE, I managed to make some animations using the Adafruit SSD1306 library. Someone adapted it to the SH1106, but it's missing some of the functions of the SSD1306. Not to mention it was pretty fun. I don't want to assume what level of coding you're at, but what I did for starters was just copy the Adafruit example code line for line into another sketch. I typed out each line, not copy/paste, still very much a beginner.

Here is some of my work in action.

https://youtu.be/CGBAAV5lkGw


#6

Yeah my OLEDs use the 1106 library, not the SSD1306. BUt I guess it depends which OLED you have. If one uses the SSD1306 library and you only see the top 8 rows of pixel and the rest is noise, then one need to use the SH1106 instead.

I think the stuff that's not supported for 1106 was scrolling of text, but I can live without that.


#7

Do you know if the invert function still works in the adapted 1106 library? That's the one thing I use heavily that doesn't seem to be in the other ones. The u8g2 library can invert the entire screen, and do xor inversions for bitmaps, but not just any selection of the screen like you can with the Adafruit library.


#8

Yes the invert works :slight_smile:

Also inversion of text:

If you download the SH1106 library, the stuff not working is commented out, it's only a few things. The rest works :slight_smile:


#9

Your video looks nice. Is this Arduino or Axoloti?


#10

Thanks :slight_smile: Yup all in the Arduino IDE. Once I tidy up the code a bit I'll share it in case it's helpful for anyone.


#11

Nice :slight_smile:

I use it mostly for text, which is fine for me. I send data from Pure Data to Arduino, then I can have many parameters visible at the same time :slight_smile: