Main Site Documentation

Problems getting a Fez Hydra up and running with Visual C# Express 2010


#1

Hi there,

We have hit a bit of a brick wall getting a Fez Hydra mainboard up and running on a Windows 7 64bit machine, running C# express 2010.

We have installed Visual C# Express 2010, and although the NETMF and Gadgeteer Package 2014 R2 itself failed, we did manage to install all its components, namely, MicroFrameworkSDK 4.2, GadgeteerCore, sam-ba2.12 and DfuSe_Demo_V3.0.3_Setup_amd64. (we also tried the x86 version of the latter, which failed, presumably because the 64bit version was already installed).

We are following the tutorial here:
http://www.ghielectronics.com/downloads/Gadgeteer/Mainboard/Hydra/FEZHydra%20Basic%20Kit%20Guide.pdf

The result is that we get as far as the ‘Choose a mainboard’ dialog. This window is empty and a warning is displayed, ‘No mainboards were found on this system. Please install a SDK from the manufacturer of your mainboard.’

We have searched widely for other SDKs for the Fez Hydra without luck. What are we doing wrong?


#2

@ royshearer - Visual Studio 2010 is no longer supported. You must use Visual Studio 2012. There is a free express edition available.


#3

Ah yes, I omitted to say we have tried with both configurations: Visual C# Express 2010 with MicroFrameworkSDK 4.2, and Visual C# Express 2012 with MicroFrameworkSDK 4.3. We get exactly the same behaviour both ways.


#4

@ royshearer - I would uninstall everything related to NETMF, Gadgeteer, and our SDK. Make sure that any NETMF SDK is uninstalled and that VS2012 is installed. Then run our 2014 R2 installer and see if the mainboards appear.


#5

OK, that seemed to work thank you!

I am now working through the Joystick and LED7R example in the pdf guide here:
http://www.ghielectronics.com/downloads/Gadgeteer/Mainboard/Hydra/FEZHydra%20Basic%20Kit%20Guide.pdf

Next question: On p17 I am asked to select JoystickPressed from the IntelliSense menu. I am not offered this however. I am offered some other options shown in the attached screenshot instead.

Which should I choose, or does this indicate there being something wrong with my software installation?


#6

If you look closely at the example, you see that the object you want is “joystick” with a lower case j. This is the name of your object. Your code is currently written with an uppercase J - this is the name of the Joystick class. Use the object joystick and you should see the methods that you are looking for.

Best wishes.


#7

Ah OK, thanks that makes sense now.

So I have my code ready:

using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Presentation.Shapes;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace GadgeteerApp5
{
    public partial class Program
    {
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            /*******************************************************************************************
            Modules added in the Program.gadgeteer designer view are used by typing 
            their name followed by a period, e.g.  button.  or  camera.
            
            Many modules generate useful events. Type +=<tab><tab> to add a handler to an event, e.g.:
                button.ButtonPressed +=<tab><tab>
            
            If you want to do something periodically, use a GT.Timer and handle its Tick event, e.g.:
                GT.Timer timer = new GT.Timer(1000); // every second (1000ms)
                timer.Tick +=<tab><tab>
                timer.Start();
            *******************************************************************************************/

            joystick.JoystickPressed += joystick_JoystickPressed;
            joystick.JoystickReleased += joystick_JoystickReleased;
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
        }

        void joystick_JoystickReleased(Joystick sender, Joystick.JoystickState state)
        {
            Debug.Print("Joystick Released");
            led7R.TurnLightOn(7, true);
        }

        void joystick_JoystickPressed(Joystick sender, Joystick.JoystickState state)
        {
            Debug.Print("Joystick Pressed");
            led7R.TurnLightOff(7); 
        }
         
        
    }
}


For some reason my software prefers

to [code=cs]‘lED7R’[/code

My Hydra and modules are connected as instructed. When I choose ‘Start Debugging’ I get:

Looking for a device on transport 'USB’
Starting device deployment…
Iteration 0

And it continues slowly counting through iterations, ultimately stopping, without any behaviour change from the Hydra and modules. Is this what I should I expect to happen? Could there be a problem with my connections?


#8

Thanks @ andre.m,

I still can’t seem to get beyond this point, text from the output window:

Looking for a device on transport 'USB’
Starting device deployment…
Iteration 0
Opening port \?\usb#vid_1b9f&pid_0102#0000000001#{d32d1d64-963d-463e-874a-8ec8c8082cbf}
Attaching debugger engine…
… cannot attach debugger engine!

‘There were deployment errors. Continue?’ dialogue, I click Yes.

‘An exception occurred while attempting to launch the debugger: Object reference not set to an instance of an object.’ dialogue, I click OK.

The operation could not be completed.’ dialogue, I click OK.

In the Error list I get this:

Warning 1 Cannot find a schema that defines target namespace ‘http://schemas.microsoft.com/dsltools/GadgeteerDSL’, schema validation skipped. C:\Users\r.shearer\Documents\Visual Studio 2012\Projects\GadgeteerApp5\GadgeteerApp5\Program.gadgeteer 2 2 GadgeteerApp5

Warning 2 Cannot find a schema that defines target namespace ‘http://schemas.microsoft.com/dsltools/GadgeteerDSL’, schema validation skipped. C:\Users\r.shearer\Documents\Visual Studio 2012\Projects\GadgeteerApp5\GadgeteerApp5\Program.gadgeteer.diagram 2 2 GadgeteerApp5

Error 3 Unable to communicate with device USB:Gadgeteer

I have tried pinging the board in FEZ Config and I get this:
Device not found or cannot be opened - USB:Gadgeteer
Pinging…
Failure - Device is not connected or not responding.

Any ideas?


#9

Do you mean as described here?
https://www.ghielectronics.com/docs/165/netmf-and-gadgeteer-troubleshooting#2366

The status bar says that the Hydra is connected.

However, when I click ‘Erase application’ I get a ‘Failure - Device is not connected or not responding’ dialogue.


#10

Any GHI folk out there who can help with this one?


#11

I’m following the troubleshooting guide here


on page 118

My mainboard is not showing up in the devices menu of the project properties/.NET Micro Framework window.

Any help here would be greatly appreciated.


#12

I’m following the troubleshooting guide here


on page 118

My mainboard is not showing up in the devices menu of the project properties/.NET Micro Framework window.

Any help here would be greatly appreciated.


#13

I’m following the troubleshooting guide here


on page 118

My mainboard is not showing up in the devices menu of the project properties/.NET Micro Framework window.

Any help here would be greatly appreciated.


#14

Too me, it looks like you should try a new vs project and start with a simple design with only a button. The current vs project might be in a bad state.


#15

With old boards, it is best to start by making sure all software on the board is up to date. Follow the instructions starting here: https://www.ghielectronics.com/docs/39/fez-hydra-developers-guide#3252


#16

Hi Jeff, thanks for that. I have followed the steps in ‘Loader update’ at the link you posted above. I hit a snag on the last step however in that the board still does not show up in Fez Config. I have tried opening Fez Config when the board is in 3 different states: the serial connection mode that I used to update the Loader; the same but having reset the board; and connecting in the normal USB mode.

Basically, there still seems to be a fundamental problem with the board connection. The board used to show up intermittently in Fez config and now it never shows up at all.

Any advice?


#17

can you capture screenshots of Device Manager statuses in those modes and share them here ? That’s usually more informative than FezConfig info…