Cerberus and Seed OLED

Hi All
Doing this

Bitmap bitmap = new Bitmap(100, 20);
            byte[] framebuffer = new byte[100 * 20 * 2];
            bitmap.DrawText("Hello World :)", Resources.GetFont(Resources.FontResources.small), GT.Color.Orange, 0, 5);

            Util.BitmapConvertBPP(bitmap.GetBitmap(), framebuffer, Util.BPP_Type.BPP16_RGB_BE);
            oledDisplay.FlushRawBitmap(0, 0, 100, 20, framebuffer);

Results in italicised text that doesnt start in the right place. (using the 7-23 Beta at the moment).
Anyone else seen this. I havent worked out how to use Skewworks Picomax yet so thought i would start with the info from the wiki http://wiki.tinyclr.com/index.php?title=OLED_Display_Module#Using_the_display_in_a_low_memory_situation

Also notice the colour difference between the pic and GT.Color.Orange

Cheers Hugh

Seems like you have a wrong display size configured?

Hmmm just tried the OLED with my spider :frowning:

Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1)

#### Message: 
#### Gadgeteer.Modules.Seeed.OledDisplay::Paint [IP: 0036] ####
#### Gadgeteer.Modules.Module+DisplayModule+SimpleGraphicsInterface::Redraw [IP: 000b] ####
#### Spider_OLED.Program::ProgramStarted [IP: 0024] ####
#### Spider_OLED.Program::Main [IP: 0015] ####

A first chance exception of type ‘System.NullReferenceException’ occurred in GTM.Seeed.OledDisplay.dll
OledDisplay ERROR : Painting error

All i did was this.

  oledDisplay.SimpleGraphics.DisplayText("Hello World!", Resources.GetFont(Resources.FontResources.small), GT.Color.Red, 10, 10);

again based on the wiki entry.

@ HughB -

Wait for the next RC of the SDK. It should be out soon.

Can’t wait :slight_smile:

why can’t you wait? LOL just kidding … :wink:

:wink:

This is fixed in the Newest SDK to be released soon.

This is because of the conversion that you are using. The Conversion you are using is the Util.BPP_Type.BPP16_RGBBE instead of the Util.BPP_Type.BPP16BGR_BE. It is hard to notice the RGB is BGR.

You should be able to see the color difference if you retry it now.

Awsome Aron
I didn’t see that there was a BGR rather than RGB. Dyslexia strikes again :slight_smile:

The new SDK is out. You can try the OLED flushRAW function now. :slight_smile:

HughB, I ran into a lot of the same issues when doing this debug window widget [link], some sample code I’d seen somewhere was coming out italic for me (changed the width from 128 to 127 seemed to fix), and I too had RGB not BGR, plus I was getting steadily marching corruption on whatever the last flushed rectangle was. Will have to see later if things are improved with new SDK.

I’m going to grab the new sdk and give it a shot. I think making the text 127 is a good idea as the display is 128 which may be screwing up the data ( hence the italicising)
Thanks for the code share link too. Very useful cheers :slight_smile:

The OLED drivers were changes with yesterday’s SDK. Can you try it and let us know if you have any issues?

The drivers seem to have squished the bugs magnificently, and I’ve revised my code to match.

Confimed working too :slight_smile: