Page 4 of 5

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Fri Jul 20, 2012 8:33 am
by AlouetteIII
This OLED is now available here for PARIS v4r6 owners http://www.multiwiicopter.com/products/1-oled with the micro JST cable and connector - and clear heat shrinked to isolate it

Image

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Fri Jul 20, 2012 10:13 am
by Hamburger
The display is also available in blue or yellow.
at ebay http://www.ebay.de/itm/I2C-0-96-OLED-di ... 1e665de5a7
or wide.hk: http://www.wide.hk/products.php?product ... rduino-%29
I ordered from both in the past, worked ok.

Previous poster forgot to mention with this display it is also possible to display telemetry info, including battery status and max. altitude over ground (if baro is present).

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Fri Jul 20, 2012 2:20 pm
by Wayne
I have benefited from all the work done to get OLED to work therefore I have drafted a Wiki page for MW OLED.
Its based on entries in this thread, cut and paste actually, and includes how to activate it and how to change the logo.
I am not a member of Google Code so I was hoping a member could edit it and upload it to the Wiki so others can enjoy OLED.
I cannot get the file to attach so as I put it in a code box the image of the OLED and my document format was lost.


Code: Select all

OLED Wiki

MultiWii.com discussion here:
http://www.multiwii.com/forum/viewtopic.php?f=7&t=1350

MW includes programming for this OLED:

Available at:
http://www.ebay.com/itm/130566448551?ss ... 129wt_1163

Hooking it to your MWC is easy, provide it 5V, GND, SCL & SDL.

Changes to be made to MW:
In config.h:
/**************************************************************/
 /*****************        LCD/OLED - display settings       *************/
 /*************************************************************/
/* uncomment this line if you plan to use a LCD or OLED */
      #define LCD_CONF
And
/*********************The type of LCD     ***************************/
/* choice of LCD attached for configuration and telemetry, see notes below */
      #define OLED_I2C_128x64 // I2C LCD: OLED http://www.multiwii.com/forum/viewtopic.php?f=7&t=1350

Telemetry can also be turned on:
/************************    Activation     ***************************/
    #define LCD_TELEMETRY
You have to define what telemetry pages to display:
/* to enable automatic hopping between a choice of telemetry pages uncomment this.
       This may be useful if your LCD has no buttons or the sending is broken
       hopping is activated and deactivated in unarmed mode with throttle=low & roll=left & pitch=forward
       set it to the sequence of telemetry pages you want to see
       2 line displays support pages 1-9
       multiline displays support pages 1-5 */
    //#define LCD_TELEMETRY_AUTO "123452679" // pages 1 to 7 in ascending order
    //#define LCD_TELEMETRY_AUTO  "212232425262729" // strong emphasis on page 2
/* same as above, but manual stepping sequence; requires stick input for each stepping */
    //#define LCD_TELEMETRY_STEP "0123456789" // must begin with 0
Advanced OLED settings……
Custom Logo:
To edit / change the logo, as a starting point, use the LOGO bitmap in the attached zip file. http://www.multiwii.com/forum/download/file.php?id=978

Simply edit it with any paint program and save the bitmap as 8-bit, monochrome.
Then, you need to convert the bitmap to 1024 bytes of pixel data...
To do this, you'll need an executable called LCDassistant.exe. get it here: http://www.0x00f.com/files/programs/
Run LCDassistant and load your modified LOGO.bmp
Make sure "Byte orientation" is set to Vertical and Pixels/byte is set to 8.
Then click Save Output. Name the file logo.h
Open this file with a text editor.
You should see the array variable definition : const unsigned char LOGO [] = {.......
You need all the data between the curly braces, so highlight all the bytes, and copy

Then, in LCD.pde look for
prog_uchar LOGO[] PROGMEM = { // logo....

Replace all 1024 bytes in the LOGO array with the array contents of file you've just saved. ( everything between "{" and "}" )
Do not change anything else.

H. (Thank you Howard)
_____________________________________________________________________

Adding your name and contact number to OLED display:
 Find on the LCD tab find:
LCDsetLine(2); LCDprintChar(line2);
I added this directly below that line: (up to 21 characters between “”)
LCDsetLine(3); LCDprintChar("MY NAME, MY NUMBER"); 
You can even add a forth line…
LCDsetLine(4); LCDprintChar("Bla, Bla, Bla….."); 

W.


Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Fri Jul 20, 2012 2:58 pm
by LenzGr
Wayne wrote:I have benefited from all the work done to get OLED to work therefore I have drafted a Wiki page for MW OLED.
Its based on entries in this thread, cut and paste actually, and includes how to activate it and how to change the logo.

Very cool, thanks for summarizing this!
I am not a member of Google Code so I was hoping a member could edit it and upload it to the Wiki so others can enjoy OLED.
I cannot get the file to attach so as I put it in a code box the image of the OLED and my document format was lost.

I've slightly modified and added it to the Wiki now (not the one on Google code): http://www.multiwii.com/wiki/index.php?title=OLED - feel free to update/format/expand it!

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Jul 26, 2012 11:23 pm
by AlouetteIII
@Wayne or @Howard or anybody with GPS active - have you got good GPS data displaying for page 7 under 2.1 with low cycle time penalty as mention by hunburger? Also is it possible to show the nmber of Satellites in view on page 0 - otherwise its just a blank page when stepping through. thanks in advance - and great idea to show GPS data guys.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Fri Jul 27, 2012 9:00 am
by Hamburger
right,
the '2-lines GPS page 7' could use an update.
Same for the multiline variant.
As I still do not have a GPS I will not blindly touch that part. Volunteers?

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Sat Jul 28, 2012 8:12 pm
by Wayne
AlouetteIII and all,
I do have good GPS data page 7 with ‘#define DISPLAY_2LINES’, its just truncated and not displaying the numbers before the decimal.
I now have multi-line working, displaying all 3 GPS locations, but I don’t know about the cycle time penalties. (I am sure there is some.)
Page 7 does display the number of sats., I’ll look into page 0
I also updated the ‘stock’ logo with V2.1 & http://www.multiwii.com.
(p.s. looks like your avatar is going to make a great logo)

I cannot attach the LCD tab file and its too big to place in a code box so here is what I changed...
Paste over LCD tab line 5:

Code: Select all

static char line1[17],line2[17],line4[17],line5[17],line6[17],line7[17];


Insert at LCD tab line 1812:

Code: Select all

#ifndef SUPPRESS_TELEMETRY_PAGE_7
    case 7:
    case '7':
      #if GPS
      if (linenr++ % 2) {

        strcpy_P(line1,PSTR("- Lat - - Lon --"));
        //                   0123456789012345
        if (f.ARMED) line1[14] = 'A'; else line1[14] = 'a';
        if (failsafeCnt > 5) line1[15] = 'F'; else line1[15] = 'f';
        line1[0]=GPS_coord[LAT]<0?'S':'N';
        line1[8]=GPS_coord[LON]<0?'W':'E';
        line1[6]=0x30+GPS_numSat;
        LCDsetLine(1);LCDprintChar(line1);
       
      } else {
        int32_t aGPS_latitude = abs(GPS_coord[LAT]);
        int32_t aGPS_longitude = abs(GPS_coord[LON]);
        int pos=0;
        strcpy_P(line2,PSTR("------- ------- "));
       
        line2[pos++] = '0' + aGPS_latitude / 1000000 - (aGPS_latitude/10000000) * 10;
        line2[pos++] = '0' + aGPS_latitude / 100000  - (aGPS_latitude/1000000)  * 10;
        line2[pos++] = '0' + aGPS_latitude / 10000   - (aGPS_latitude/100000)   * 10;
        line2[pos++] = '0' + aGPS_latitude / 1000 -    (aGPS_latitude/10000) * 10;
        line2[pos++] = '0' + aGPS_latitude / 100  -    (aGPS_latitude/1000)  * 10;
        line2[pos++] = '0' + aGPS_latitude / 10   -    (aGPS_latitude/100)   * 10;
        line2[pos++] = '0' + aGPS_latitude        -    (aGPS_latitude/10)    * 10;       
       
        pos++;
        line2[pos++] = '0' + aGPS_longitude / 1000000 - (aGPS_longitude/10000000) * 10;
        line2[pos++] = '0' + aGPS_longitude / 100000  - (aGPS_longitude/1000000)  * 10;
        line2[pos++] = '0' + aGPS_longitude / 10000   - (aGPS_longitude/100000)   * 10;
        line2[pos++] = '0' + aGPS_longitude / 1000    - (aGPS_longitude/10000) * 10;
        line2[pos++] = '0' + aGPS_longitude / 100     - (aGPS_longitude/1000)  * 10;
        line2[pos++] = '0' + aGPS_longitude / 10      - (aGPS_longitude/100)   * 10;
        line2[pos++] = '0' + aGPS_longitude           - (aGPS_longitude/10)    * 10;
       
        LCDsetLine(2);LCDprintChar(line2);
        strcpy_P(line4,PSTR("GPS-Hold Position"));
        LCDsetLine(4);LCDprintChar(line4);
        int32_t aGPS_HoldLat = abs(GPS_hold[LAT]);
        int32_t aGPS_HoldLon = abs(GPS_hold[LON]);
        pos=0;
        strcpy_P(line5,PSTR("------- ------- "));
       
        line5[pos++] = '0' + aGPS_HoldLat / 1000000 - (aGPS_HoldLat/10000000) * 10;
        line5[pos++] = '0' + aGPS_HoldLat / 100000  - (aGPS_HoldLat/1000000)  * 10;
        line5[pos++] = '0' + aGPS_HoldLat / 10000   - (aGPS_HoldLat/100000)   * 10;
        line5[pos++] = '0' + aGPS_HoldLat / 1000 -    (aGPS_HoldLat/10000) * 10;
        line5[pos++] = '0' + aGPS_HoldLat / 100  -    (aGPS_HoldLat/1000)  * 10;
        line5[pos++] = '0' + aGPS_HoldLat / 10   -    (aGPS_HoldLat/100)   * 10;
        line5[pos++] = '0' + aGPS_HoldLat        -    (aGPS_HoldLat/10)    * 10;       
       
        pos++;
        line5[pos++] = '0' + aGPS_HoldLon / 1000000 - (aGPS_HoldLon/10000000) * 10;
        line5[pos++] = '0' + aGPS_HoldLon / 100000  - (aGPS_HoldLon/1000000)  * 10;
        line5[pos++] = '0' + aGPS_HoldLon / 10000   - (aGPS_HoldLon/100000)   * 10;
        line5[pos++] = '0' + aGPS_HoldLon / 1000    - (aGPS_HoldLon/10000) * 10;
        line5[pos++] = '0' + aGPS_HoldLon / 100     - (aGPS_HoldLon/1000)  * 10;
        line5[pos++] = '0' + aGPS_HoldLon / 10      - (aGPS_HoldLon/100)   * 10;
        line5[pos++] = '0' + aGPS_HoldLon           - (aGPS_HoldLon/10)    * 10;
       
        LCDsetLine(5);LCDprintChar(line5);
        strcpy_P(line6,PSTR("GPS-Home Position"));
        LCDsetLine(6);LCDprintChar(line6);
        int32_t aGPS_HomeLat = abs(GPS_home[LAT]);
        int32_t aGPS_HomeLon = abs(GPS_home[LON]);
        pos=0;
        strcpy_P(line7,PSTR("------- ------- "));
       
        line7[pos++] = '0' + aGPS_HomeLat / 1000000 - (aGPS_HomeLat/10000000) * 10;
        line7[pos++] = '0' + aGPS_HomeLat / 100000  - (aGPS_HomeLat/1000000)  * 10;
        line7[pos++] = '0' + aGPS_HomeLat / 10000   - (aGPS_HomeLat/100000)   * 10;
        line7[pos++] = '0' + aGPS_HomeLat / 1000 -    (aGPS_HomeLat/10000) * 10;
        line7[pos++] = '0' + aGPS_HomeLat / 100  -    (aGPS_HomeLat/1000)  * 10;
        line7[pos++] = '0' + aGPS_HomeLat / 10   -    (aGPS_HomeLat/100)   * 10;
        line7[pos++] = '0' + aGPS_HomeLat        -    (aGPS_HomeLat/10)    * 10;       
       
        pos++;
        line7[pos++] = '0' + aGPS_HomeLon / 1000000 - (aGPS_HomeLon/10000000) * 10;
        line7[pos++] = '0' + aGPS_HomeLon / 100000  - (aGPS_HomeLon/1000000)  * 10;
        line7[pos++] = '0' + aGPS_HomeLon / 10000   - (aGPS_HomeLon/100000)   * 10;
        line7[pos++] = '0' + aGPS_HomeLon / 1000    - (aGPS_HomeLon/10000) * 10;
        line7[pos++] = '0' + aGPS_HomeLon / 100     - (aGPS_HomeLon/1000)  * 10;
        line7[pos++] = '0' + aGPS_HomeLon / 10      - (aGPS_HomeLon/100)   * 10;
        line7[pos++] = '0' + aGPS_HomeLon           - (aGPS_HomeLon/10)    * 10;
       
        LCDsetLine(7);LCDprintChar(line7);
      }
      #endif // case 7 : GPS
      break;
#endif

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Sun Jul 29, 2012 9:34 am
by AlouetteIII
Thanks Wayne- thanks - glad to know you got it working with 2.1 - I just tried your mod code and got this - error - size - Binary sketch size: 32026 bytes (of a 30720 byte maximum)
For GPS my main interest is knowing how many sats are locked - and then checking ALT - DistHome and Speed - as error reference checks before takeoff where the flight might be GPS dependant - 5 Sats is OK but really 10 is more common - At the moment I would say logo is too large for the 328 cpu user - and generally have this cool function disabled - Also after arming I prefer the LCD uses no cycle time at all - no need to display pages - prior to that it can use more for sure in pre-flight check - and maybe show all the GPS co-ordinates on 7 then ALT - DistHome and Speed and number of Sats on Pg 0

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Sun Jul 29, 2012 11:04 pm
by Wayne
Too bad about the file size.
I have added # of Sats, Dist. Home & Gnd. Speed to page 0.
Problem I have is I cannot yet get it to toggle back thru page 0 like before 2.1.

Paste over line 5 on LCD tab:

Code: Select all

static char line1[17],line2[17],line3[17],line4[17],line5[17],line6[17],line7[17];


Insert at line 653 on LCD tab: (after LCDsetLine(2); LCDprintChar(line2);)

Code: Select all

strcpy_P(line3,PSTR("Number of SATS-."));
  line3[15]=digit10 (GPS_numSat);
  line3[16]=digit1 (GPS_numSat);
  LCDsetLine(3);LCDprintChar(line3);
  strcpy_P(line4,PSTR("Dist. to HOME-"));
  //line4[14]=digit100 (GPS_distanceToHome);
  line4[15]=digit10 (GPS_distanceToHome);
  line4[16]=digit1 (GPS_distanceToHome);
  LCDsetLine(4);LCDprintChar(line4);
  strcpy_P(line5,PSTR("GPS Grnd.Speed-"));
  //line5[14]=digit100 (GPS_speed);
  line5[15]=digit10 (GPS_speed);
  line5[16]=digit1 (GPS_speed);
  LCDsetLine(5);LCDprintChar(line5);



W

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Tue Jul 31, 2012 10:20 am
by Hamburger
Wayne wrote:Problem I have is I cannot yet get it to toggle back thru page 0 like before 2.1.

? I do not understand. Is this with tele.auto or tele.step ?
Paste over line 5 on LCD tab:

Code: Select all

static char line1[17],line2[17],line3[17],line4[17],line5[17],line6[17],line7[17];


please do not display multiple lines in one cycle. It will drive cycle time to the sky. I will not integrate it that way into the code base :(
The current way to do it is to display one line at a time - like interlaced. If you find display refresh is too slow, you can lower LCD_TELEMETRY_FREQ.
You can see how interlaced display is done from implementation of other multiline pages.Have a look, it is easy enough to understand and extend. It saves you delcaration of more lineX variables also - memory is important.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Tue Jul 31, 2012 2:11 pm
by Wayne
Thanks for the input Hamburger.
For me, when I stick out of Telm. or Setup, OLED goes blank now instead of back to page 0.
Forget page 7, we know that is a memory hog and too hard to read anyway.
About adding a couple lines to page 0, will there be cycle time problems if we turn off OLED when MW is armed?
I will now look to how other pages are painted, as a non-coder I was just copying other parts and with trial and error getting what I wanted to work. I have no dreams of anyone integrating my work into the code base.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Aug 01, 2012 9:47 am
by Hamburger
page 0 actually does not exist, 0 stands for no display, so I take it you mean page 1 (battery, altitude, times...).

To understand what is going on
You have compiled in tele.auto and/or tele.step plus lcd.oled with lcd.oled.logo disabled.
What you experience is this sequence:
1. page 1 is active, gets updated
2. you turn on LCDconf to tune parameters
3. exit LCDconf via save or abort
4. oled screen says save/abort exiting, then goes blank?

Is that what you experience?

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Aug 01, 2012 4:45 pm
by Wayne
What I was calling page 0 is the page that displays the MW Version and the aircraft type.
Yes, that is what I am experiencing, OLED goes blank after save/exit.
Only sometimes, if I go into TELE first, exit goes thru CONFIG then back to TELE.
I did load a clean copy of 2.1 without any of my changes, same thing, kinda gets stuck going back to TELE.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Aug 01, 2012 5:49 pm
by Hamburger
ok. What you are referring to is the OLED init screen. Yes, that will be displayed only after power cycle/reset.

Your system behaves as could be expected.

Adding the OLED display to my Copters - I2C problems

Posted: Thu Aug 02, 2012 1:26 pm
by vistauser
The below mentioned problems occur on both of my copter platforms with 2.1 firmware and standard PID settings.

1. Arduino Pro Mini with ATAVRSBIN1 sensor board, orange 6 ch rx
2. Flyduino Mega FC, ATAVRSBIN1, BMP085, FMP04 GPS on Flyduino FMP04 GPS Bob, Spektrum SAT RX

Initial power on of the copter = various I2C errors in GUI resulting in big corrections of yaw when MAG is on.
Unflyable especialy with GPS.
RESET of the flight control results in most cases to "i2c error 1" in GUI. No effect on MAG = good HH. Copter is flying normal.

TELEMETRIE or CONFIG
If pages on OLED are shown = big fluctuations of cycle time in GUI.
Telemetrie on OLED page shows "t-errs" between around 10 and 90 fluctuating
or in CONFIG "an overrun xy" xy is a snapshot of the value and here not updated.

Pullup R meassured is 3.05k for SCL and SDA on both copters.

Without the OLED display there are never more than one I2C errors.

Beside this, the configuration and indication with this OLED mod is impressive and i love it, thank you dear developers.

73, 55
Olaf

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Aug 02, 2012 8:47 pm
by Hamburger
Olaf,
sounds like a general problem with your i2c bus. You should not see i2c errors rise after init. Everything else you describe is side effects of your i2c problem.
Smaller pullups might help

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Aug 02, 2012 9:26 pm
by vistauser
Hamburger,
thanx, will try that

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Aug 08, 2012 11:49 am
by Sebbi
Is this OLED Display from Watterott compatible with MultiWii?
http://www.watterott.com/en/Monochrome- ... ic-display

They just restocked ...

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Aug 08, 2012 1:21 pm
by shikra
This one looks better and cheaper. It certainly appears compatible and less risk to not work...

http://www.multiwiicopter.com/products/1-oled

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Aug 08, 2012 4:58 pm
by cGiesen
shikra wrote:This one looks better and cheaper. It certainly appears compatible and less risk to not work...

http://www.multiwiicopter.com/products/1-oled


But you have remember shipping cost!!!

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Aug 09, 2012 8:41 am
by howardhb
http://www.wide.hk/products.php?product=I2C-0.96%22-OLED-display-module-%28-compatible-Arduino-%29
Cheapest OLED deal on the web....shipping takes 4 - 5 weeks though :shock:

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Aug 09, 2012 5:00 pm
by LenzGr
howardhb wrote:http://www.wide.hk/products.php?product=I2C-0.96%22-OLED-display-module-%28-compatible-Arduino-%29
Cheapest OLED deal on the web....shipping takes 4 - 5 weeks though :shock:

Can't confirm this - they shipped mine (to Germany) within ~10 days.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Tue Sep 04, 2012 6:00 pm
by Katch
http://www.goodluckbuy.com/crius-co-16- ... v1-0-.html

$8.54 inc delivery from our chinese friends at GLB!

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Tue Sep 04, 2012 6:05 pm
by Hamburger
impressive. They use a v2.1 code for the photo.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Tue Sep 04, 2012 6:15 pm
by Katch
can't argue at that price all soldered and plugged ready to go!

they've also just listed this nice cased ublox gps... but that's a different thread.

http://www.goodluckbuy.com/ublox6-2-5m- ... cable.html

0.96" SSD1306 128X64 OLED Display Module

Posted: Tue Oct 09, 2012 8:12 am
by Wilfrid70
Hello everyone,
I'm trying to use that new CRIUS Co-16 without MultiWii. Does somebody managed to do so ? Even with the provided arduino code, it remains black...
Having no copter or other Multiwii stuff I'm neither able to use MultiWii to even test if my oled is not fried.
I would try to extract all i2c/oled code from Multiwii but there is lot of ramifications in many code pages...
Could someone help ? Provide some simple i2c code that work with THAT oled ?
Many thanks in advance !

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Oct 11, 2012 7:39 pm
by howardhb

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Sat Dec 01, 2012 4:10 pm
by diyboy
Hello everyone,

To use a i2C OLED i need to uncomment below lines right?

/* uncomment this line if you plan to use a LCD or OLED */
#define LCD_CONF
#define OLED_I2C_128x64 // I2C LCD: OLED viewtopic.php?f=7&t=1350

Many thanks in advance!

Diyboy

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Sun Dec 23, 2012 6:26 pm
by Hamburger
Update to the OLED code - now supports double height font for better readability.
Actually that is a feature provided by the 1306 driver called 'zoom'. It displays each scan line of the first 4 text lines twice. The result looks better than it sounds and it has minimal impact on memory footprint compared to a larger font and the result is quite usable. The photos are of poor quality - it is actually pretty easy to read. No need to carry lenses to the field any more! Size is now 4 rows of text, so the telemetry pages got split into 2 pages each.
To activate, use #define DISPLAY_FONT_DSIZE
and adapt the page sequence, e.g.
#define LCD_TELEMETRY_AUTO "1!"
#define LCD_TELEMETRY_STEP "R5%4$2@9"


config menu
config menu

telemetry page 1 (first part)
telemetry page 1 (first part)

rx input - first page
rx input - first page

rx input - second page
rx input - second page


For the normal font size with 8 lines of text the pages are not split (same as before).

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Jan 16, 2013 7:33 pm
by haley0918
howardhb wrote: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)


I have the similar problem as above. Enabled LCD_TELEMETRY_AUTO and LCD_TELEMETRY_STEP in the code but the screen doesn't show any page other than the startup. Only stick combo for PID configuration works.

Is there anything I'd missed? The code is v2.1.

Code: Select all

  /**************************************************************************************/
  /***********************        LCD/OLED - display settings       *********************/
  /**************************************************************************************/

    /* uncomment this line if you plan to use a LCD or OLED */
      #define LCD_CONF

    /* to include setting the aux switches for AUX1 -> AUX4 via LCD */ //to review (activate[] is now 16 bit long)
      //#define LCD_CONF_AUX

    /* if program gets too large (>32k), need to exclude some functionality */
      /* uncomment to suppress some unwanted aux3 aux4 items in config menu (only useful if LCD_CONF_AUX is enabled) */
      //#define SUPPRESS_LCD_CONF_AUX34

    /*****************************   The type of LCD     **********************************/
      /* choice of LCD attached for configuration and telemetry, see notes below */
      //#define LCD_SERIAL3W    // Alex' initial variant with 3 wires, using rx-pin for transmission @9600 baud fixed
      //#define LCD_TEXTSTAR    // SERIAL LCD: Cat's Whisker LCD_TEXTSTAR Module CW-LCD-02 (Which has 4 input keys for selecting menus)
      //#define LCD_VT100       // SERIAL LCD: vt100 compatible terminal emulation (blueterm, putty, etc.)
      //#define LCD_ETPP        // I2C LCD: Eagle Tree Power Panel LCD, which is i2c (not serial)
      //#define LCD_LCD03       // I2C LCD: LCD03, which is i2c
      #define OLED_I2C_128x64 // I2C LCD: OLED http://www.multiwii.com/forum/viewtopic.php?f=7&t=1350

    /******************************   Logo settings     ***********************************/
      #define SUPPRESS_OLED_I2C_128x64LOGO  // suppress display of OLED logo to save memory

    /* style of display - AUTODETECTED via LCD_ setting - only activate to overwrite defaults */
      //#define DISPLAY_2LINES
      #define DISPLAY_MULTILINE
      //#define MULTILINE_PRE 2  // multiline configMenu # pref lines
      //#define MULTILINE_POST 6 // multiline configMenu # post lines
    /********************************    Navigation     ***********************************/
    /* keys to navigate the LCD menu (preset to LCD_TEXTSTAR key-depress codes)*/
      #define LCD_MENU_PREV 'a'
      #define LCD_MENU_NEXT 'c'
      #define LCD_VALUE_UP 'd'
      #define LCD_VALUE_DOWN 'b'

      #define LCD_MENU_SAVE_EXIT 's'
      #define LCD_MENU_ABORT 'x'

    /* To use an LCD03 for configuration:
       http://www.robot-electronics.co.uk/htm/Lcd03tech.htm
       Remove the jumper on its back to set i2c control.
       VCC to +5V VCC (pin1 from top)
       SDA - Pin A4 Mini Pro - Pin 20 Mega (pin2 from top)
       SCL - Pin A5 Mini Pro - Pin 21 Mega (pin3 from top)
       GND to Ground (pin4 from top)*/

    /* To use an Eagle Tree Power Panel LCD for configuration:
       White wire  to Ground
       Red wire    to +5V VCC (or to the WMP power pin, if you prefer to reset everything on the bus when WMP resets)
       Yellow wire to SDA - Pin A4 Mini Pro - Pin 20 Mega
       Brown wire  to SCL - Pin A5 Mini Pro - Pin 21 Mega */

    /* Cat's whisker LCD_TEXTSTAR LCD
       Pleae note this display needs a full 4 wire connection to (+5V, Gnd, RXD, TXD )
       Configure display as follows: 115K baud, and TTL levels for RXD and TXD, terminal mode
       NO rx / tx line reconfiguration, use natural pins.
       The four buttons sending 'A', 'B', 'C', 'D' are supported for configuration navigation and request of telemetry pages 1-4 */


  /**************************************************************************************/
  /***********************                telemetry            **************************/
  /**************************************************************************************/

    /* to monitor system values (battery level, loop time etc. with LCD enable this
       note: for now you must send single characters to request  different pages
       Buttons toggle request for page on/off
       The active page on the LCD does get updated automatically
       Easy to use with Terminal application or display like LCD - if available uses the 4 preconfigured buttons  to send 'A', 'B', 'C', 'D' */
    /********************************    Activation     ***********************************/
    #define LCD_TELEMETRY

    /* to enable automatic hopping between a choice of telemetry pages uncomment this.
       This may be useful if your LCD has no buttons or the sending is broken
       hopping is activated and deactivated in unarmed mode with throttle=low & roll=left & pitch=forward
       set it to the sequence of telemetry pages you want to see
       2 line displays support pages 1-9
       multiline displays support pages 1-5 */
    //#define LCD_TELEMETRY_AUTO "123452679" // pages 1 to 7 in ascending order
    //#define LCD_TELEMETRY_AUTO  "212232425262729" // strong emphasis on page 2
    #define LCD_TELEMETRY_AUTO "12345"

    /* same as above, but manual stepping sequence; requires
       stick input (throttle=low & roll=right & pitch=forward) to
       step through each defined telemetry page */
   //#define LCD_TELEMETRY_STEP "0123456789" // must begin with 0
   #define LCD_TELEMETRY_STEP "15240"


    /* on telemetry page B (2) it gives a bar graph which shows how much voltage battery has left. Range from 0 to 12 Volt is not very informative
       so we try do define a meaningful range. For a 3S battery we define full=12,6V and calculate how much it is above first warning level
       Example: 12.6V - VBATLEVEL1_3S  (for me = 126 - 102 = 24) */
    #define VBATREF 24

    /* if program gets too large (>32k), need to exclude some functionality
       uncomment to suppress some unwanted telemetry pages (only useful if telemetry is enabled) */
    //#define SUPPRESS_TELEMETRY_PAGE_1
    //#define SUPPRESS_TELEMETRY_PAGE_2
    //#define SUPPRESS_TELEMETRY_PAGE_3
    //#define SUPPRESS_TELEMETRY_PAGE_4
    //#define SUPPRESS_TELEMETRY_PAGE_5
    //#define SUPPRESS_TELEMETRY_PAGE_6
    //#define SUPPRESS_TELEMETRY_PAGE_7
    //#define SUPPRESS_TELEMETRY_PAGE_8
    //#define SUPPRESS_TELEMETRY_PAGE_9

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Jan 16, 2013 8:31 pm
by Hamburger
1. check tx/rx endpoint values in gui.
2. must hold stick position for some time (about 1 second?)
3. do not explicitly define DISPLAY_MULTILINE; it says so two line above - AUTODETECTED via LCD_ setting

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Jan 16, 2013 8:39 pm
by haley0918
1. checked, endpoints going below 1100 and above 1900, reaching minimum 990 and maximum 2000
2. had held it for more than 2 seconds without response
3. commented that, still no go

I'm now out of idea where does it went wrong.

EDIT: I had debugged the "telemetry_auto" variable and there was no change when applying stick combo. Somehow that part of code just doesn't seem to work.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Jan 16, 2013 10:07 pm
by Hamburger
haley0918 wrote:I'm now out of idea where does it went wrong.

So am I.
Can you try one of the later dev versions (something around r1311) from the downloads section?

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Jan 17, 2013 5:00 am
by haley0918
Just tried a few devs, r1240, r1311 and r1315. They all worked.

So is this a bug for 2.1?

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Jan 17, 2013 11:44 am
by Hamburger
this is a first time notice. Personally, I always run dev versions so I would not find out the hard way.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Jan 17, 2013 12:05 pm
by haley0918
So no one else has tried this on released 2.1?

Guess I'll just have to leave if off until 2.2.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Jan 17, 2013 12:33 pm
by Hamburger
you could just run r1315 or Alex' latest compilation from the downloads tab.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Jan 17, 2013 1:01 pm
by haley0918
Thanks! Will do once I whip out another frame.

I'm still comfortable with the old flight modes and settings for my current frame which has an important task coming up in a month.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Sat Apr 06, 2013 1:33 pm
by Hamburger
Just ordered a1.3" version with included fonts-eeprom.
Should be easier on my eyes and reduce memory footprint for my aio stand alone nanowii+oled controllers.

1.3" Serial: UART/I2C/SPI 128x64 OLED Module
From here http://www.digole.com/index.php?productID=550 or at e..y.

So the waiting for the slowboat begins.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Fri Jun 21, 2013 3:41 am
by mike808
some google searching brought me here... I've been playing around with the arduino and i can write an image to the LCD. i wanted to mimic this with a raspberry pi, but am running into issues. I have text working with this lcd with the pi, but wanted to get the image working so i'm reaching out for help. here is a contrived example.

Code: Select all

unsigned char buffer[1024];
memset(buffer, 0x00, sizeof(buffer));
// set the first 16 bytes (first 128 bits to 1) in the buffer to 0xFF
for (int i=0; i<16; i++)
   buffer[i] = 0xFF;
write_buffer(); // writes the buffer to the LCD

i was expecting the first row (horizontally) to be shown, but the result is not what i expect and i am not sure why. i have (at least i think i do) the addressing set to horizontal.

can anyone tell me what i'm doing wrong?

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Sun Sep 08, 2013 4:48 am
by mr.rc-cam
The wiki says that LCDassistant.exe is available at http://www.0x00f.com/files/programs. But I can't find it there. So I need some help locating a copy I can download.

Edit: I found it here: http://en.radzio.dxp.pl/bitmap_converter/
To use the .h output file with MWC you will need to change
From: const unsigned char LOGO [] = {
To: const uint8_t PROGMEM LOGO[] = {

- Thomas

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Sep 03, 2014 1:08 am
by fmillour
Hi, I am new to these things and try to set up a quadcopter with multiwii (previously running with a black KK board).

It has not yet taken off (but it did flip over, so I guess I am getting closer to make it work :D ).

The question I have is: I bought a random I2C OLED display from amazon http://www.amazon.com/Huhushop-TM-Seria ... B00JM88A94 which I hooked to the board (arduino nano + GY-86 on a prototyping board).

This display looks like it work in a first instance "out of the box" in multiwii 2.3 (boot OK & access to all menus), except that after a few reboots it turns black and would never light up again unless I upload the adafruit demo again... This looks like a mystery to me, I guess the adafruit library has some sort of magic reset to that screen multiwii does not have (but where)?

Would someone be able to help me in solving this mystery?
Thanks in advance

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Sep 03, 2014 1:32 am
by timecop

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Sep 03, 2014 5:03 pm
by fmillour
Thanks for the link! I will take a look to this (substantial) mod of this display :)

Anyway, since the adafruit demo work seamlessly with this display with no sign of it turning black at any time, this might mean there could be a software fix for that, instead of a hardware mod (which could lead to loss of the display I guess...).

And another question related to display: is it possible in multiwii to display characters upside down? This is because I made a mistake installing the display, which is reverse to the orientation of the quad... :mrgreen:

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Sep 03, 2014 5:07 pm
by soundstorm
Just bought a bunch of those OLEDs as I've broken the glass of my original Crius. They are working with the U8Lib, so the Crius did/does (broken the left anode, so I just see every second line). But those from eBay connected to the MultiWii do not show anything. Connected back to the Arduino on boot it shows the image it would have shown on the MultiWii till it's cleared. The back of the OLEDs are slightly different (the Crius has some more capacitors, resistors and one more transistor) - but as both are marked RIT253 at the corner and use SSD1306 chipset they should work the same.
Whats wrong here? It's not the same fault as fmillour:
But i got a trace from #6 to #11 instead of #6 to #14 and a resistor (103) is already connected to VCC and the cap is there too.

Crius right, eBay left
Crius right, eBay left

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Sep 03, 2014 9:34 pm
by soundstorm
fmillour wrote:And another question related to display: is it possible in multiwii to display characters upside down? This is because I made a mistake installing the display, which is reverse to the orientation of the quad... :mrgreen:


I've done it on my other project with this OLED - but using the U8Lib - it does nothing more, than reversing the RAM. As it's a drawing process in that Lib it's easy to reverse - but MultiWii uses direct communication (performance/memory). But there is an easy way to archive that:

Go to LCD.cpp, find the i2c_OLED_init(void)
Change the commented lines from:

Code: Select all

//  i2c_OLED_send_cmd(0xa0);      //colum address 0 mapped to SEG0 (POR)*** wires at bottom
  i2c_OLED_send_cmd(0xa1);    //colum address 127 mapped to SEG0 (POR) ** wires at top of board
//  i2c_OLED_send_cmd(0xC0);            // Scan from Right to Left (POR)         *** wires at bottom
  i2c_OLED_send_cmd(0xC8);          // Scan from Left to Right               ** wires at top
To:

Code: Select all

  i2c_OLED_send_cmd(0xa0);      //colum address 0 mapped to SEG0 (POR)*** wires at bottom
//  i2c_OLED_send_cmd(0xa1);    //colum address 127 mapped to SEG0 (POR) ** wires at top of board
  i2c_OLED_send_cmd(0xC0);            // Scan from Right to Left (POR)         *** wires at bottom
//  i2c_OLED_send_cmd(0xC8);          // Scan from Left to Right               ** wires at top

It just remaps the datalines for multiplexing (See Page 25)

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Thu Sep 04, 2014 3:14 am
by fmillour
Thanks for this trick, I am getting into it right now.

My amazon display looks like it is the same as the ebay one mentionned by soundstorm, including the row of capacitors/resistors and the "flame" logo on the back. I do not have a reverse view of it as I soldered the display to the board...

The display demo I manage to run on that display is here https://learn.adafruit.com/monochrome-o ... d-examples
I followed the comment on the amazon page http://www.amazon.com/review/R21YULDYZ9 ... 3&store=hi (including the comments for getting the links).

Here are some pics of the board. I know, my soldering skills still have to improve but anyway...

image.jpeg
image2.jpeg


I also plan to wire a bluetooth module HC-05 but no success yet following the instruction there http://makezine.com/projects/diy-arduin ... ng-shield/

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Fri Sep 12, 2014 9:10 pm
by soundstorm
Offtopic:

fmillour wrote:I also plan to wire a bluetooth module HC-05 but no success yet following the instruction there http://makezine.com/projects/diy-arduin ... ng-shield/


Why don't you use a HC-06? HC-05 just offers Master Mode, which you don't need on a copter ;-) What's your plan? Sending code via BT or just control via GUI? First one is not the best idea – on a copter you don't need to flash the firmware that often as modifying parameters on the fly. So cross connect Tx/Rx of the module and power (use one, which is already soldered to pcb with a regulation circuit and has just 4-6 pins broken out).

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Sat Sep 13, 2014 9:08 am
by Hamburger
May I suggest people consider moving from the original 0.96 oled -sometimes erroneously referred to as crius.oled - to the digole family of oleds.
Advantage is those come in different pbysical dimensions and have builtin character set. This does reduce memory requirement. Also no spurious initialization problems.
Digole is actively supported in mwii.

Re: 0.96" SSD1306 128X64 OLED Display Module

Posted: Wed Sep 17, 2014 2:29 am
by dominicclifton
Just a quick note to say these screens are now supported in Cleanflight - thanks to all that posted details about them, here's a video:

https://www.youtube.com/watch?v=-w-Ikv5U1Lw



@Hamburger - have you got a link to the ones you're referring too?