Trying out the sample app for the FEZ Hat and hit an exception

Hi All;

My FEZ Hat has arrived in the mail, as has my RP2. I ran to the store, got a MicroSD, and got started installing IoT Core on my RP2, quite excited to watch it load.

So next I grabbed the driver off the GHI site, fired up the project, deployed it, and ran into this:

[quote]An exception of type ‘System.IO.FileNotFoundException’ occurred in GHIElectronics.UAP.Testers.FEZHATTester.exe but was not handled in user code

WinRT information: Slave address was not acknowledged.

Additional information: The system cannot find the file specified.

Slave address was not acknowledged.

If there is a handler for this exception, the program may be safely continued.[/quote]

It broke on the this.device.WriteRead line in the following:

 public Measurement TakeMeasurement() {
            this.device.WriteRead(this.writeBuffer1, this.readBuffer1);
            this.device.WriteRead(this.writeBuffer2, this.readBuffer2);

            var rawTemperature = this.readBuffer2[0] << 8 | this.readBuffer2[1];
            var rawHumidity = this.readBuffer1[0] << 8 | this.readBuffer1[1];

            var temperature = 175.72 * rawTemperature / 65536.0 - 46.85;
            var humidity = 125.0 * rawHumidity / 65536.0 - 6.0;

            if (humidity < 0.0)
                humidity = 0.0;

            if (humidity > 100.0)
                humidity = 100.0;

            return new Measurement() { Temperature = temperature, RelativeHumidity = humidity };
        }

Any advice/suggestions would be greatly appreciated, this is uncharted territory for me.

Maybe you are using a newer version of windows? Do other things work as expected?

@ Gus - Ooh, lemme try commenting out the calls to the Function…

Yup, it otherwise works like a charm!

What is the Rotary reading off of? That one is a 0 for me.

@ Squeebee - I ran into that, too. See this thread:

https://www.ghielectronics.com/community/forum/topic?id=19678

Basically, the sample code includes functions for reading an external temperature sensor and rotary sensor, neither of which are included on the board itself. So just find where the TempS170 code is called, and comment that out, and you should be good to go.

Hope that helps!

Oh yes! Those are Gadgeteer modules we used for testing. We should comment these by default.

Whoah wait, Gadgeteer modules? :wink:

@ Squeebee - oh wait, did I say too much :wall:

Well, you can use a breakout module to interface anything compatible with the Pi 2, HAT or otherwise. Just need the driver, amirite? :wink:

That’s notwithstanding anything else that might come along…that @ Gus shouldn’t be talking about.