-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial support for SSD1306 128x32 or 128x64 OLED displays #312
Conversation
Yes that failure is due to the wrong version of Circle, but I don't really know how to update that... |
The "proper way" in Git would go somewhat like this: https://github.com/probonopd/MiniDexed/wiki/Development#updating-synth_dexed-git-submodule. But here the issue is that if we want to update circle, which is referenced by Synth_Dexed, so we'd need to fork Synth_Dexed to do it the "proper way". Hence I am doing it differently, "on the fly", which means that we don't need to fork the Synth_Dexed repo: |
Do you see any chance we might be able to display the algorithms on the (small) display? Maybe once you are in the algorithm selection menu and while you are rotating the knob, use the full screen to display just the selected algorithm, similar to Source: https://www.youtube.com/watch?v=_BwTXK8seks if space is not sufficient, then maybe use symbols similar to the Korg opsix (but rotate the algorithm diagram by 90 degrees): Source: https://www.deepsonic.ch/deep/docs_manuals/korg_opsix_manual_e2.pdf |
Does MiniDexed_2022-07-17-606a92b work for you? |
Not at the moment, no, as the support in circle just mirrors the "character mode" of the HD44780 - it isn't an actual graphics mode. I went this was as all your menu handling assumes all those "special" control characters and a textual display too... But eventually I know there is interest in "proper" graphics in circle so it might be possible, but then you'd have to re-write whole chunks of your UI to match... |
Yes, what I mean is to use character mode everywhere and just switch to graphics mode while oen is selecting algorithms. Is that possible? I was hoping this would require the smallest change. |
With a display like this
I have it working on a 128x64 display, but strangely only every second row of pixels is used. This seems to be similar ThingPulse/esp8266-oled-ssd1306#179 where someone said "program looked at the wrong place where the 128 x 32 Pixel Display was still defined". Could it be that something similar is going on here? What I am seeing on my MiniDexed display is basically this effect: At http://forum.espruino.com/conversations/269330/ someone says that adding a 100ms delay before initialising the display helps, someone else says there are different types of displays which might require slightly differet initialization code. |
Hmm. That's what I was getting with LCDHeight=64 and LCDRows=2 (as I'd expect)... I was using one of these and 64/4 seemed to work for me, I'll take another look and make sure I've not spelled the option wrong or anything like that! |
Nothings impossible, but that reads like some hard-coding throughout, but I don't believe that is going on here... but will take another look.
They are referring to the Adafruit SSD1306 driver which supports I2C, SPI or software SPI. This code only supports I2C. From what I can see, once the access method is set up, the actual initialisation of the SSD1306 appears the same, but feel free to correct me if I'm wrong... I'll try to have a look with the new build later to see if I get the same. |
Well using that build you've linked to seems to work ok for me. With one of those 128x64 screens like the one you show, it works as follow for me:
So for me, actually rows=2 or 4 makes no difference, but Height=32 or 64 is the key. Given all that, I'm not sure why yours isn't working...? (there does seem to be a minor bug where the display goes a little odd on the first encoder click, but it sorts itself out with the second. Maybe there is some cursor initialisation/position thing missing... I'll have to have a look). |
It would first require graphics support in circle, which doesn't exist for the SSD1306 I'm afraid. |
Possibly it was due to a faulty SSD1306, I can't say for sure. In any case, I managed to destroy my old module (probably due to a bad attempt at unsoldering the pin connector) (VCC-GND-SCL-SDA and non-switchable i2c address) and purchased a new one. The new one is slightly different (a bit smaller PCB; GND-VCC-SCL-SDA and switchable i2c addresses using a resistor) -- and it works flawless! So with those "generic" modules, there seem to be different versions, both electrically and physically. Makes it a bit harder to write concise instructions (and model 3D files). Just one thing to be aware of. |
Yes, I've seen them with VCC/GND swapped and also with SDA/SCL swapped. Thankfully that doesn't affect the code though, it just means it's hard to draw wiring diagrams! :) Glad its working! |
Thank you very much @diyelectromusic. Have used it with success for a while now, merged! |
Initial support for SSD1306 OLED I2C displays. Note: This requires latest develop branch of Circle.
Submitted for experimentation and initial testing. All comments welcome!
Kevin