Cobra won't do anything :(

Hi all,

I have the cobra with 7" lcd connected to the PC, Visual Studio 2010 is set to talk to the EMX_EMX USB device. I have the Cobra Graphic Demo sample code and have commented out the obsolete RTC lines. The solution builds, downloads to the Cobra, then nothing…

Output window says The thread has exited with code 0 and the lcd is just cycling through color patterns. Please help! Sorry for being such a noob…

Please see the display brochure on how to configure the cobra to run your 7" display

Thanks Gus I had added that code to the Display Configuration menu. I’ve added it to the main of the sample code…

I would like to remind you that the LCD configuration code needs to be run only once.
Once set, you can deploy any other application without adding the configuration code to the the application code.

In another word, the new LCD configuration are saved.

Would you have to rerun the configuration code after you erased the firmware prior to updating the sdk?

Mike… I had to with my 4.3… after the last firmware update…

Cheers Ian

That’s helpful to know… It that also the case with the touch screen calibration settings? Do I run that code before executing the main?

The touch system is not saved like LCD config. That is because you always have the same settings for your display for all your devices but then you need to calibrate touch for very single device.

Right I now have the demo code running, without touch screen calibration for now… But the keyboard, mouse and terminal window programs don’t run. I get System.OutOfMemoryException, I think it’s because I’m using the 7" LCD. How do I set SystemMetrics.ScreenWidth and SystemMetrics.ScreenHeight? It says that they are read only so I can’t set them so how does SystemMetrics ‘get’ these values? Does it ‘get’ them from Configuration.LCD.Set?

Cobra has 16MB or ram. You shoal never ever get out of memory exception!!! Unless you are doing something completely wrong.
Maybe you have large images going in custom heap nor regular heap. Read the free ebook to learn more about custom heap and large images

I’m not doing anything custom. I have just loaded the Cobra GHI graphics demo code, after adding the configuration code for 7" LCD. The mouse, keyboard and terminal demos don’t work. The icons appear but I can’t actually select them. I’ll keep playing and let everyone know if I find out why…

Or running a [italic]bunch[/italic] of programs at once in Pyxis without unloading any.

Sounds like you haven’t set your touch screen… Use the touch configuration sample to get the five points of calibration and save them using the Extended Weak Reference…

Or just renew them on each startup ( this is what I do.)

Cheers Ian