Out of Memory Exception

It seems to me like I should not be getting an out of memory exception with a program this basic.

My Cerbuino code looks like this.

    void ProgramStarted()
        this.temperatureHumidity.MeasurementComplete += this.TemperatureHumidityMeasurementComplete;
        // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
        Debug.Print("Program Started");

    void TemperatureHumidityMeasurementComplete(TemperatureHumidity sender, double temperature, double relativeHumidity)
            "Temperature: " + ((temperature * 1.8) + 32).ToString(), 
            GT.Color.Yellow, 5, 40);

Have you checked the oled wiki page? Of should help

Do you have a link to there?

Using simplegraphics with the oled does not work.
Have a look at this thread for more info. There are some links from there to a better way of doing things.

I have created a module driver using Skeworks driver.

It can do exactly what you need, but there isn’t much ram left, and you need to remove a few references that are not used.

I’ll try to get back to you with more info tonight, in about seven or eight hours.

@ GMod Any luck with that code by chance?

Hi sq77,

Not much luck. It is so close to using all the ram that it runs SOMETIMES. Then you reboot and it doesn’t run… :frowning:

@ GMod, OOM exceptions will happen with Debugger attached. Run without the debugger and see where that leaves you. You’re also welcome to send a project along to me and I can look at it.

One more thing to improve is to move Font object out of the event function. Just make it a class member and load it once in the ProgramStarted.

You might also want to go with pure NETMF, Gadgeteer is adding overhead there.