Main Site Documentation

Panda and FEZ Touch


#1

I just got a new FEZ Panda II and a new FEZ Touch to play around with. I am getting into learning how to use micro controllers for fun stuff.

I can’t even get the basic example to work, I must be doing something stupid.

I am using this driver
http://code.tinyclr.com/project/363/fez-touch-driver-ver-21/

and this library
http://code.tinyclr.com/project/328/fez-touch-ui-controls/

When I use the demo example for touch ui controls I am met with 31 errors

Error	9	'GHIElectronics.NETMF.FEZ.FEZ_Components.FEZTouch' does not contain a definition for 'FONT_HEIGHT'	D:\Programming\VS\Touch fun\Touch fun\fez-touch-ui-controls.cs	481	125	Touch fun


Error	1	No overload for method 'DrawString' takes 5 arguments	D:\Programming\VS\Touch fun\Touch fun\fez-touch-ui-controls.cs	80	13	Touch fun


Error	2	An object reference is required for the non-static field, method, or property 'GHIElectronics.NETMF.FEZ.FEZ_Components.FEZTouch.ScreenWidth.get'	D:\Programming\VS\Touch fun\Touch fun\fez-touch-ui-controls.cs	133	28	Touch fun

Thanks for any help


#2

Your project namespace is probably different than the one in examples.

Welcome to the community.


#3

Thank you for your very quick response and welcome. I copied and pasted everything from the example into my program.cs. (So the namespace should be the same)

There was another piece that was missing too

For this driver LCDConfiguration takes 8 arguments (new for orientation) but the example doesn’t have that. Maybe the driver and ui library aren’t right anymore. I’m not sure, a little disappointing.

Thanks again for your help Gus


#4

Incorrect assumption. Copying and pasting code is exactly why the namespaces are probably not right.


#5

Ahh, I see. Thanks for the help. I am highly inexperienced. I will tinker around with it more


#6

@ Dan12 - When you create a project in VS, the default namespace is the same as the project name. When you copy and paste “the whole shebang” from an example, you inadvertently get the namespace/project name from the example code. If you are a little more selective about what you copy, this can be avoided, or you can just update the namespace after the paste. There are also free or cheap third party extensions that will warn you of this issue and make the change for you (JetBrains Resharper is awesome).

Have fun!


#7

@ Dan12,
For the FEZ Touch Driver, you should copy the whole project using the zip file, and then modify it as needed. I don’t think the FEZ Touch Driver version you are using is compatible with the FEZ Touch UI Controls. You may need to do some tweaking to get them to play together.


#8

Thank you all for your help. Looks like I have some more learning to do!


#9

I got it figured out (Thanks to help) What jasdev said was correct. I just used the regular driver and it works perfectly. Thanks for the very quick support