0.96" SSD1306 128X64 OLED Display Module

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by msev »

That idea for using the lcd instead of and osd is great...from some foam one could make a sunshade...but some new things would have to be coded dont know how difficult would be to add a home arrow which is quite essential...and a lot of other info would be useful.

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by nhadrian »

I ordered my 0,96 OLED display more than two weeks, and still nothing. Because I couldn't choose any tracked shipping method, I don't know were it is currently...:(
Does anybody have some idea where I could get one within EUROPE?????

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

Mine was shipped in a normal brown letter envelope - snail mail :P and took 24 days (shipped from the Virgin Islands)
I looked all over. The only I2C version was from www.wide.hk

Wayne
Posts: 86
Joined: Sun Jul 31, 2011 10:44 pm

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Wayne »

I see that OLED is included in today’s _dev.
Good job Howard!

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by nhadrian »

howardhb wrote:Revised LCD code attached. :)


Dear Horward.

I have just received my OLED. Installed, and uploaded the code posted a while ago (LCD.zip). I inserted the lines into config.h and def.h and multiwii.ino.
Now, it works great, but I have balck letters on white background. How I could change to white letters instead?
BTW, great job at all!!!! Looks really impressive on my mini hexa.... :D:D:D

EDIT: I can't navigate in the menu, picture is like freezed. Could you post the final lcd file for MW2.0? (And not for the latest dev, which is in merged)

BR
Adrian

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

hi

my oled arrived today in a brown envelope :)

its working very well. damn smal display :)

the 2-line mode is great. but in multiline there is some garbage on screen. i can read something but there are not all chars readable and not well formated.
i use the latest dev 20140414

any solution?

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

mbrak wrote:hi
the 2-line mode is great. but in multiline there is some garbage on screen. i can read something but there are not all chars readable and not well formated.
i use the latest dev 20140414


I haven't done any further development of multiline, been on vacation :mrgreen: but will get down to it ASAP. :roll:

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Hamburger »

mbrak wrote:hi

my oled arrived today in a brown envelope :)

its working very well. damn smal display :)

the 2-line mode is great. but in multiline there is some garbage on screen. i can read something but there are not all chars readable and not well formated.
i use the latest dev 20140414

any solution?

photo?
You talking about the config menu or the telemetry stuff?
For config menu it might be the vt100 control sequences for text atrributes bold,inverse,normal are passed through?
Howard will sort this out, I am sure.

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

Hamburger wrote:Howard will sort this out, I am sure.

Yes, for sure....

I've just started migrating / upgrading to FlyduinoMega + FreIMU V4.0.3 with Spektrum Sat..... on MW V2.0 so a bit of learning here..
All those extra serial ports :D GPS and BT on the way!

I haven't done any development of multiline, been on vacation :mrgreen: but will get down to it ASAP. :roll:

Now downloading the DEV version to see if there are any hiccups....

H.

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

Here is the preliminary multiline config for OLED for DEV Version 20120414.
I had to reformat the Program Space Strings, to suit the OLED's 21 character line, and, because I battled a bit to get everything nicely lined up.

There is a slight change in CONFIG.
In order to use the OLED, you must: #define OLED
And if you want the LOGO displayed: #define OLED_I2C_128x64, otherwise comment it out.
(This will provide a way to disable the LOGO code - which wastes more than 1024 bytes of flash ROM, but still use the OLED without the LOGO)

Remember to: #define DISPLAY_MULTILINE

And also change, in Multiwi setup()

Code: Select all

#if defined(LCD_ETPP) || defined(LCD_LCD03) ||  defined(OLED_I2C_128x64) 

to:

Code: Select all

#if defined(LCD_ETPP) || defined(LCD_LCD03) ||  defined(OLED) 

And, change, in DEF.h, all references to "OLED_I2C_128x64" to "OLED"
#Hamburger, I don't know how to commit the code to the shared subversion, so I've attached a .zip :oops:

Still to do: LCD Telemetry....
H.
Multiline.png
Attachments
LCD.zip
(16.15 KiB) Downloaded 8413 times

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

Hello Howard

you are my hero !!!
multiline-config is working great!! many thanx!


how did you display batt, i2cerrors and so on like in your picture?

Wayne
Posts: 86
Joined: Sun Jul 31, 2011 10:44 pm

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Wayne »

Thank you for the help getting my OLED back Howard.

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

@ mbrak, to get battery voltage, in config.h, #define VBAT , and to see I2C errors etc, #define LOG_VALUES 1.

Thanks must go to Hamburger for his nicely simplified multiline code, which I adapted for the OLED display. Kudos! :mrgreen:

H

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Hamburger »

divided we fight, united we stand!
The outcome of our combined efforts really does look convincing, if I may say so.
I am still waiting for my OLED in the mail - I want mine too, and I want it now :)
Hamburger

PS: this tread's name has become kinda misleading for the Howard-OLED. I understand Alex did try and use another OLED but did not finish the implementation. So maybe we should either
- ask Alex to rename the thread, or
- start a new one, if the interest persists much longer.

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by msev »

I'd like to see a video of how the newest code works :)...its interesting to see it in action :)

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

howardhb wrote:@ mbrak, to get battery voltage, in config.h, #define VBAT , and to see I2C errors etc, #define LOG_VALUES 1.

Thanks must go to Hamburger for his nicely simplified multiline code, which I adapted for the OLED display. Kudos! :mrgreen:

H



thanks hamburger for the multiline code !

when did you order your oled? my oled arrived after apro 14 days. i think its fast from hongkong!


@msev i will make a small video later. its not very easy to get a good focus with the camera.

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by msev »

Thanks Mbrak :)

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

here is a small video simply navigating through the menu.

http://youtu.be/Oz9ZXYLmMIQ

hope this will show the functionality of the oled display.
the highlighted value in the middle can be modified by turning roll to left or right.

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by msev »

Thanks! looks nice :)

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

:mrgreen: I'm still tweaking the code, bit by bit.....Is it ever going to end????
I've added a few small mods (some minor formatting and spacing)

LCD_TELEMETRY
MultiLine works OK now, except for there being too few lines :roll:

@mbrak, thanks for your video.....
After watching it, I realised that I could improve the display "update" time by removing LCDclear() before ConfigRefresh is called.
Also, suppressing blinkLED(10,20,1) after each stick input.
This improved the the display update too much :o ..... it became difficult to stop on a desired position or digit, so I added a small delay (60ms).
I also made a video to show what this mod looks like in action...
http://youtu.be/RDgr0dfoL0I

Attached is the .zip of my code.

H.
Attachments
HOWARD-OLED LCD.zip
I think this will be the last change I make, or NOT!
(16.32 KiB) Downloaded 1476 times

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

hi howard

works fine your new file.

the delay is very good to nagivate.

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

hi

would it be possible to display a so called "status"-line in the mainscreen?

we have 21 chars per line.

GYR ACC MAG BARO GPS

every sensor which is selected would be inverted in display.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Hamburger »

thant is implemented in telemetry for multiline displays already for all 11 auxN items - or do you really need feedback on the existence of sensors in your copter?

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

Hamburger wrote:thant is implemented in telemetry for multiline displays already for all 11 auxN items - or do you really need feedback on the existence of sensors in your copter?


no :) i wont check the existence of sensors. only highlighted when activated.

i have problems with telemetry. how do i activate it? (sketch) with the stick combo (throttle down + roll left/pitch fwd) i cant active the screens.

but imho it is more comfortable to have a main screen with some status.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Hamburger »

the stick combo is correct. Must have TELEMETRY_AUTO defined to "1" (and or other pages). Page 1 should resemble what you call status.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Alexinparis »

howardhb wrote::mrgreen: I'm still tweaking the code, bit by bit.....Is it ever going to end????
I've added a few small mods (some minor formatting and spacing)

LCD_TELEMETRY
MultiLine works OK now, except for there being too few lines :roll:

@mbrak, thanks for your video.....
After watching it, I realised that I could improve the display "update" time by removing LCDclear() before ConfigRefresh is called.
Also, suppressing blinkLED(10,20,1) after each stick input.
This improved the the display update too much :o ..... it became difficult to stop on a desired position or digit, so I added a small delay (60ms).
I also made a video to show what this mod looks like in action...
http://youtu.be/RDgr0dfoL0I

Attached is the .zip of my code.

H.


Hi,
it's really interesting like this !

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Alexinparis »

Hamburger wrote:divided we fight, united we stand!
The outcome of our combined efforts really does look convincing, if I may say so.
I am still waiting for my OLED in the mail - I want mine too, and I want it now :)
Hamburger

PS: this tread's name has become kinda misleading for the Howard-OLED. I understand Alex did try and use another OLED but did not finish the implementation. So maybe we should either
- ask Alex to rename the thread, or
- start a new one, if the interest persists much longer.


Hi,
In fact it's the same display, but with a different pcb layout.
I can communicate via SPI with the one I ordered , and it should work via I2C but I didn't manage to do it.
The one Howard ordered works very well via I2C( I ordered one also and can confirm this ;) )
I will add this precision in the first post

Cronalex
Posts: 51
Joined: Tue Mar 20, 2012 8:41 pm

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Cronalex »

I have a multiwii crius SE I can use this LCD? if you like to do?

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

Short answer - Yes!
Effectively, this display is connected in parallel with the sensors I2C bus lines.
But, the Crius board does not have pins specifically connected to the I2C bus lines. :roll: You will have to solder 4 wires / pins - SDA, SCL, and of course, +5v and 0v.
On the Atmega328 processor, SDA is on Pin 27, and SCL is on Pin 28.

H.

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

Dev20120430 - Just finished merging my OLED code.
(now includes the throttle expo)
Haven't tested it yet... gave my OLED to a fellow copter-maniac :lol:
@mbrak & @nhadrian, can you test it please?

Once again, I have to attach a zip file here......don't know how to submit to the shared subversion :oops:

H.
Attachments
HOWARD-OLED LCD - 20120430.zip
(16.84 KiB) Downloaded 1567 times

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Alexinparis »

Hi,
You can give me your email in pm and I will add it to the google code so that you can change yourself the _shared part.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Hamburger »

I have integrated the code from 19.04.2012 into _shared.
Some changes were neccessary to avoid the bulk of duplicate code. #if OLED #else

Status:
configMenu works fine, with some telemetry pages I experience overruns - guess some lengths have to be adapted to the 21 char width.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Hamburger »

most quirks should be fixed now.
Both configmenu and telemetry pages work now.

In telemetry, randomly the screen gets garbled in one of two ways.
- Line 1 (the top line) gets displayed as the bottom line.
- or even worse, the top 50% of line 1 get displayed below the last line.
Not sure why - cannot reproduce yet, conditions unknown.

Also at one point I got 4 lines double the normal height. Unfortunately again I have no idea what triggered this.

Obvious: I did receive my first OLED couple of days ago. Took more than 4 weeks. Two more OELDs on their way.

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

I gave my OLED to a fellow copter friend :D so I can't test it now either.
2 more on their way..... :arrow:

mon_lolo_fr
Posts: 40
Joined: Tue Nov 15, 2011 9:50 am

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mon_lolo_fr »

Hi all,

thanks for the excellent work done concerning the OLED display integration to the multiwii project, so far so good ;-)

A simple question regarding the electrical connections of the display:

1) how about connecting it directly to an BEC output of an ESC (around 5.2V) is it OK or not ?

2) concerning now the I2C bus, is this OK:
2.1) with 5V I2C voltage level on SDA and SCL with the pullups enabled on the MCU328P side ?
2.2) and the other at 3.3V I2C voltage level on SDA and SCL with pullups disabled on the MCU328P side, but with pullups physically enabled on an IMU board ?

Just to be sure for everything ;-)

Thanks

Laurent

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

howardhb wrote:Dev20120430 - Just finished merging my OLED code.
(now includes the throttle expo)
Haven't tested it yet... gave my OLED to a fellow copter-maniac :lol:
@mbrak & @nhadrian, can you test it please?

Once again, I have to attach a zip file here......don't know how to submit to the shared subversion :oops:

H.



hi howard

your new code works very well!
all new goodies like throttle expo/mid are now configurable.
great job!!

thanks
br michael

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

Thanks for testing it Michael!
:ugeek: Sometimes I surprise myself...

My new Quad, FlyduinoMega with FreeIMU043, is flying really well now....I'm using an Eagletree PowerPanel LCD at the moment, only 2 lines :cry: but still extremely useful!
Having an LCD / OLED at the field to trim PID's has helped immeasurably.
My 2nd order for OLED's is on it's way.... will try to fix the issues Hamburger is having / had, jast as soon as they arrive.

Hamburger wrote:Also at one point I got 4 lines double the normal height. Unfortunately again I have no idea what triggered this.

Have you experienced similar issues that Hamburger reported?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by PatrikE »

I'm waiting for my OLED from Ebay.
I did order April 5th.
Quite long delivery i think...

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

i compared both files. lcd from hamburger in trunk and your file. there are many differences in the code. think hamburger doesnt use your latest file :)

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by mbrak »

PatrikE wrote:I'm waiting for my OLED from Ebay.
I did order April 5th.
Quite long delivery i think...



puhh

The delivery was within 16 days of arrival at me.

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

:o Just checked the status of my order from http://www.wide.hk
Status is "Awaiting Fulfillment" ??? Hope this doesn't mean "OUT OF STOCK" :cry:

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Hamburger »

mbrak wrote:i compared both files. lcd from hamburger in trunk and your file. there are many differences in the code. think hamburger doesnt use your latest file :)

corrrect. It appeared after I had begun integrating the prior one.
Also I do not like huge chunks of duplicate code and the many #if OLED #else conditionals.
LCD.pde is meant to provide functionality for many displays, not tuned for only one particular display.
So yes, expect a long diff.
Should work the same more or less.

Wayne
Posts: 86
Joined: Sun Jul 31, 2011 10:44 pm

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Wayne »

I can report that I successfully loaded dev_20120504 and was able to #define OLED_I2C_128x64 to get OLED to work without any other changes!!!

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

Thanks to Hamburger for merging the code (again) and for some intuitive clean-up of the numerous "#if defined(OLED...." 8-)

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Hamburger »

I have one OLED currently working on my Crius board, which is under experimental status for my first MWii helicopter. Two more OLEDs on their way in the mail, I hope.
So I have vested interest to keep that code together with vt100 support up and running in MWii.
@Howard
in case you continue making modifications outside of the subversion system, please always post two files together: the changed one plus that file prior to your changes. That helps in finding the diffs more easily and integrating into the current main branch.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by PatrikE »

My Oled arrived yesterday.
4 weeks delivery.

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

howardhb wrote:@Howard
in case you continue making modifications outside of the subversion system, please always post two files together: the changed one plus that file prior to your changes.

Will do! Thanks Hamburger.

Indecently, I cant get Telemetry auto to work. The stick combination of throttle low, roll left and pitch forward does not initiate the auto telemetry screen hopping
(debug works though)
H.

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by PatrikE »

To low rates on any of the channels?
Must reach min & max checkvalues.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by Hamburger »

Activated the config?

User avatar
howardhb
Posts: 189
Joined: Tue Oct 11, 2011 7:10 pm
Location: Port Elizabeth, South Africa

Re: 0.96" SSD1306 128X64 OLED Display Module

Post by howardhb »

I have checked my config.h ......

#define LCD_TELEMETRY
#define LCD_TELEMETRY_AUTO "123452679"

The page suppression defines are all commented out.

Also, to be sure, I changed the MINCHECK to 1200, and MAXCHECK to 1800.
The GUI shows 1002 for MIN and 1996 MAX.

:?

Post Reply