Cerbuino bee With Seed Oled problem

Hi !!

I start to use my Cerbuino bee. I Upgrade de firmare.
Than I create a new project with a button and a ldr7r and everything is ok, but when i try to add a seed oled i have several probllems:

       - First toolbox Seed Tab doens't appear. I try to show all tabs, but seed tab is in Gray.

       - I add a reference directly to my project and the project start to give some errors.

                   Link failure: some assembly references cannot be resolved!!

                   Assembly: GTM.Seeed.OledDisplay (1.4.1.0) needs assembly 'Gadgeteer' (2.41.0.0)
                   Assembly: GTM.Seeed.OledDisplay (1.4.1.0) needs assembly 'mscorlib' (4.1.2821.0)
                   Assembly: GTM.Seeed.OledDisplay (1.4.1.0) needs assembly 'Microsoft.SPOT.Graphics' (4.1.2821.0)
                   Error: a3000000

Cerbuino MsDeploy info :

Pinging… TinyCLR
DeviceInfo:
HAL build info: 4.2.0.0, Copyright Oberon microsystems, Inc.
OEM Product codes (vendor, model, SKU): 255, 0, 65535
Serial Numbers (module, system):
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Solution Build Info: 4.2.1.0, Copyright (C) GHI Electronics, LLC
AppDomains:
default, id=1
Assemblies:
mscorlib,4.2.0.0
Microsoft.SPOT.Native,4.2.0.0
Microsoft.SPOT.Hardware,4.2.0.0
Microsoft.SPOT.Graphics,4.2.0.0
Microsoft.SPOT.TinyCore,4.2.0.0
Microsoft.SPOT.Hardware.SerialPort,4.2.0.0
Microsoft.SPOT.Hardware.OneWire,4.2.0.0
Microsoft.SPOT.Hardware.Usb,4.2.0.0
Microsoft.SPOT.Hardware.PWM,4.2.0.1
Microsoft.SPOT.Net,4.2.0.0
System,4.2.0.0
GHIElectronics.Gadgeteer.FEZCerbuinoBee,1.0.1.0
Gadgeteer,2.42.0.0
Gadgeteer.WebClient,2.42.0.0
GTM.Seeed.OledDisplay,1.4.1.0
Microsoft.SPOT.IO,4.2.0.0
GTM.GHIElectronics.LED7R,1.0.0.0
Gadgeteer.SPI,2.42.0.0
Microsoft.SPOT.Touch,4.2.0.0
System.Http,4.2.0.0
GHI.OSHW.Hardware,4.2.1.0
GTM.GHIElectronics.Button,1.0.0.0
System.IO,4.2.0.0
GadgeteerApp3,1.0.0.0
Gadgeteer.WebServer,2.42.0.0
Microsoft.SPOT.Net.Security,4.2.0.0
System.Net.Security,4.2.0.0

COMPILE ERROS WHEN COMPILE WITH SEEED OLED DISPLAY

Create TS.

Loading start at 8055f8c, end 8079ab0

Assembly: mscorlib (4.2.0.0)Assembly: Microsoft.SPOT.Native (4.2.0.0)Assembly: Microsoft.SPOT.Hardware (4.2.0.0)
Assembly: Microsoft.SPOT.Graphics (4.2.0.0)Assembly: Microsoft.SPOT.TinyCore (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.OneWire (4.2.0.0)
Assembly: Microsoft.SPOT.Hardware.Usb (4.2.0.0)Assembly: Microsoft.SPOT.Hardware.PWM (4.2.0.1)
Assembly: Microsoft.SPOT.Net (4.2.0.0)Assembly: System (4.2.0.0)Loading Deployment Assemblies.

Attaching deployed file.

Assembly: GHIElectronics.Gadgeteer.FEZCerbuinoBee (1.0.1.0)Attaching deployed file.

Assembly: Gadgeteer (2.42.0.0)Attaching deployed file.

Assembly: GTM.Seeed.OledDisplay (1.4.1.0)Attaching deployed file.

Assembly: Microsoft.SPOT.IO (4.2.0.0)Attaching deployed file.

Assembly: GTM.GHIElectronics.LED7R (1.0.0.0)Attaching deployed file.

Assembly: Microsoft.SPOT.Touch (4.2.0.0)Attaching deployed file.

Assembly: System.Http (4.2.0.0)Attaching deployed file.

Assembly: GHI.OSHW.Hardware (4.2.1.0)Attaching deployed file.

Assembly: GTM.GHIElectronics.Button (1.0.0.0)Attaching deployed file.

Assembly: System.IO (4.2.0.0)Attaching deployed file.

Assembly: GadgeteerApp4 (1.0.0.0)Attaching deployed file.

Assembly: System.Net.Security (4.2.0.0)Attaching deployed file.

Assembly: Microsoft.SPOT.Net.Security (4.2.0.0)Resolving.

Link failure: some assembly references cannot be resolved!!

Assembly: GTM.Seeed.OledDisplay (1.4.1.0) needs assembly ‘Gadgeteer’ (2.41.0.0)

Assembly: GTM.Seeed.OledDisplay (1.4.1.0) needs assembly ‘mscorlib’ (4.1.2821.0)

Assembly: GTM.Seeed.OledDisplay (1.4.1.0) needs assembly ‘Microsoft.SPOT.Graphics’ (4.1.2821.0)

Error: a3000000

Waiting for debug commands…

The program ‘[5] Micro Framework application: Managed’ has exited with code 0 (0x0).

Any help ??
Thanks in advance !

@ Paulo Sergio Pereira -

The Seeed module drivers are currently only supported under NETMF/Gadgeteer version 4.1.

Cerbuino Bee requires version 4.2, so if you wish to use the Seeed OLED Display module, you’ll need to manually retarget the driver.

First, grab the builder templates from:

http://gadgeteer.codeplex.com/downloads/get/377948

Then, grab a commit of the source tree containing the Seeed drivers, such as:

http://gadgeteer.codeplex.com/SourceControl/changeset/changes/17974

Take a look at the existing 4.1 driver project, and how the code is organized. Porting to 4.2 isn’t a terribly difficult task, if you take the time to understand how the project is put together.

Any luck with porting this driver? I’am running into the same problem.

We have completed all of the Seeed module drivers, and will be releasing them with the next SDK.

4 Likes

Shame you’ve had to do this for them, though.

@ Steven -

Did you just port them? Did you test them on the STM32F4 boards? I rebuilt the OLED driver for 4.2, but couldn’t use it on a Cerberus. It ran out of memory trying to allocate at 32KB buffer… :frowning:

This is GHI my friend :slight_smile: updated driver will be up soon

Do the math :slight_smile:

128 * 128 = 16, 386 pixels * bits-per-color * three_colors;

Great news!! Any idea when this SDK is going to be released?

Any word on when the new SDK will be available?

How did you handle the missing Interface.SPI in 4.2, or was it added?

Thanks

Yes Mike, I did the math, and it doesn’t look good. :frowning:
From what I can see, 32K is allocated for the frame buffer(128 * 128 * 2 bytes per pixel=32K), but on top of that atleast one 64K bitmap is allocated.
As things currently stand this display does NOT work with the Cerberus with the driver just moved over to 4.2.

Incorrect, otherwise we wouldn’t have made cerberus at all :slight_smile: The new drivers coming in days have a new added method to draw parts of the screen so while you can’t have full screen buffer at once, you can cover the part you like to refresh. And if you need to refresh the whole screen, you can, just do it in parts. So yes the display work and yes cerberus memory is large enough for applications but it is small for image buffering so you need to stick with small bitmaps and you need ot plan your code properly.

Of course, the wiki will have full instructions as well.

Great news!

I was about to create a new driver on the framework of the Panda Touch driver, no frame buffer, just do everything directly in the display’s buffer.

I’m not sure what you mean about the Interface.SPI. Can you give me an example? Or is it specific to this driver?

In 4.2 SPI got moved to it’s own DLL and is a reference that must be added to the project. Is that maybe the problem refered to?

I bet that is it.

Now I have installed the latest version of 4.2 with the seeed oled display drivers included. To test the display I use this code:

  oledDisplay.SimpleGraphics.DisplayText("test", Resources.GetFont(Resources.FontResources.small), 
GT.Color.Magenta, 10, 10);

But get this error:

Using mainboard GHI Electronics FEZCerbuinoBee version 1.2
Failed allocation for 2736 blocks, 32832 bytes

Failed allocation for 5463 blocks, 65556 bytes

Failed allocation for 5463 blocks, 65556 bytes

A first chance exception of type 'System.OutOfMemoryException' occurred in Microsoft.SPOT.Graphics.dll
OledDisplay ERROR : Painting error
Failed allocation for 5463 blocks, 65556 bytes

Failed allocation for 5463 blocks, 65556 bytes

A first chance exception of type 'System.OutOfMemoryException' occurred in Microsoft.SPOT.Graphics.dll
OledDisplay ERROR : Painting error
Program Started
The thread '<No Name>' (0x3) has exited with code 0 (0x0).
The program '[3] Micro Framework application: Managed' has exited with code 0 (0x0).

How can I use this code on my Cerbuino board? thanks!

@ rbruinsma -
You can’t use SimpleGraphics on the Cerbuino. You need do something like this, but I don’t know how to convert form Bitmap to byte[] yet…

            Bitmap bitmap = new Bitmap(100, 10);
            byte[] framebuffer=new byte[100*10*2];
            bitmap.DrawRectangle(GT.Color.Blue, 1, 0,0,127, 127,0,0, Color.Black,0,0, Color.Black,0,0,100);

            //copy bitmap to byte[] here

            oledDisplay.FlushRawBitmap(0, 0, 100, 10, framebuffer);

@ GMod(Errol) - ok thanks. please let me know if you figured out the bitmap to byte[] conversion.

Ok, Guss told me where to look, you must include GHI.OSHW.Hardware, then this code will do the job:

Bitmap bitmap = new Bitmap(100, 10);
byte[] framebuffer=new byte[100*10*2];
bitmap.DrawRectangle(GT.Color.Blue, 1, 0,0,99, 9,0,0, Color.Black,0,0, Color.Black,0,0,100);

Util.BitmapConvertBPP(bitmap.GetBitmap(), framebuffer, Util.BPP_Type.BPP16_BGR_BE);
 
oledDisplay.FlushRawBitmap(0, 0, 100, 10, framebuffer);