Main Site Documentation

Joystick issues


#1

Hello,

I’ve been trying to use a joystick in a few projects I’ve been making at school. However my first problem is that there seems to be a problem with using the joystick in any code that I use.

joystick.JoystickPressed += new Joystick.JoystickEventHandler(joystick_JoystickPressed);

I’ve been trying to use that code, but it gives me a few errors, such as:

'The type name ‘JoystickEventHandler’ does not exist in the type ‘Gadgeteer.Modules.GHIElectronics.Joystick’

and

‘Gadgeteer.Modules.GHIElectronics.Joystick’ does not contain a definition for ‘JoystickPressed’ and no extension method ‘JoystickPressed’ accepting a first argument of type ‘Gadgeteer.Modules.GHIElectronics.Joystick’ could be found (are you missing a using directive or an assembly reference?)

However, all other components that I am using are working fine. Does anyone have any suggestions on what I can do?
Thanks.


#2

I seem to recall there being some issues with the Joystick. I think there are some fixes for it coming this week. Search around for another thread about Joysticks from a few weeks ago.


#3

Here I found the thread…

http://www.tinyclr.com/forum/21/5125/


#4

Firstly, thanks for your help Ian. I downloaded that but sadly am still getting the same problem. At school it works fine but it is only at home that I am having these problems. Do you have any other suggestions?


#5

did you try to create a new project
and start again?

never experienced your problem, but many problems were magically solved by reloading visual studio :slight_smile:


#6

Yeah, thanks for the suggestion though :wink:


#7

In case you haven’t seen this, there is also new SDK/Firmware (released yesterday):

http://www.tinyclr.com/forum/12/5358/#/1/

That might help.


#8

You almost certainly have a bad or missing file reference. Unfortunately, the new SDK software was yanked last night and hasn’t been put back on the site. As soon as Gus puts it back up, I would uninstall everything then reinstall the new SDK and make sure you update your firmware in the process. Then remove & re-add all your assembly references to your project.


#9

Well Ian, as it turns out my friend was having a look around and managed to find an installer from around October. I uninstalled almost everything, and what do you know, it worked! Thank you so much for your help!!

And Architecht, truth be told I did have a look at that page but thought little of it… I should probably look harder next time. :wink:


#10

Great! I’d still be sure and update the SDK as soon as it’s back since there were some known issues with the old versions of the Joystick driver.


#11

Ok, will do. Once again thank you!