Main Site Documentation

GameO GHI.OSHW.Hardware prevent running


#1

Hi All,

I have got something different. I have written a tiny .NETMF 4.2 console application. I can deploy and run/debug this to my GameO unit.

When I add GHI.OSHW.Hardware (4.2.6.0) via reference and then deploy/debug it is looks like it starts but that almost immediately exits and stops debugging.

Anybody any ideas what I might be doing wrong?

Regards,
Sebastiaan


#2

Can you please show your code?


#3

Hi Architect,

This is my main program:

        Display.Clear();
        Display.TurnBackLightOn();
        System.Threading.Thread.Sleep(10000);
        Display.TurnBackLightOff();
        System.Threading.Thread.Sleep(180000);
        Power.TurnOff();

I am using the Display class from the code share. And everything works properly. But when I add the reference GHI.OSHW.Hardware to the project and run it without changing any code it simple doesn’t run on the unit anymore.

It compiles and looks like it is deploying only to then not start.

I am wondering if I maybe am using a wrong version for VS 2012


#4

@ s.j.w.vreeken - your program starts and clears the screen. the screen is black.

you turn on the backlight, which is already on by default. the screen is still black.

you sleep and turn off the backlight. the screen is still black.

I suggest you add a Debug.Print statement after each action to see what is happening. you could also single step the debugger.

you could post what is in the output window.


#5

Or try something like this after you Clear the display:



Bitmap bmp = new Bitmap(160, 120);
bmp.DrawRectangle(Color.White, 1, 10, 10, 80, 160, 0, 0, Color.White, 0, 0, Color.White, 0, 0, ushort.MaxValue);
Display.Draw(bmp, x, y);


Be aware that you power off the device completely at the end.