Hello - I am new to Netduino. I have successfully connected my Netduino GO to a DAQ board to a Bosch Temp/Press sensor and all works on initial deployment (yeah!):
Temp: 72.5 Fahrenheit
Alt: -126.86425 meters
Pressure: 102430 Pascals
But, when I deploy a second time it throws an unhandled error at GetPhysicalResources in the init code. I don't get an error, just a page showing no source available. I do have the DAQ init code in my project, and i can step through it.
However - If i unplug the DAQ and erase the code on the Go, it will work fine next time.
The code prior to error is:
[color=#ff0000;]1. static NwazetDAQ daq = new NwazetDAQ();[/color]
[color=#ff0000;] 2. daq.Initialize(GoSockets.Socket1);[/color]
In the NwazetDAQ.cs the error then occurs here (red annotated #3):
public void Initialize(GoSocket socket, uint speedKHz = 16000) {
if (speedKHz < 5000 || speedKHz > 16000) throw new ArgumentException("speedKHz");
if (socket == null) throw new ArgumentNullException("socket");
SPI.SPI_module spiModule;
Cpu.Pin chipSelect;
Cpu.Pin gpioGoBus;
[color=#ff0000;] 3. socket.GetPhysicalResources(out gpioGoBus, out spiModule, out chipSelect);[/color]
When i look at the socket in the watch window, it is not bound. But, this must be some type of non-released resource. I have tried (without change) to dispose of the daq after use daq.Dispose().
Thanks,