The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
I am trying to get the Parallax Ping))) Sensor working with the Netduino GO and the Shield Base. I am using the Ping class that was created by afulki which can be found here.
Whenever I try to run the code I get an error that states:
An unhandled exception of type 'System.Exception' occurred in GoBusSerialTransport.dll
This is my Program.cs:
public static void Main()
{
ShieldBase shieldbase = new ShieldBase(GoSockets.Socket1);
Thread.Sleep(5000);
ParallaxSensors.Ping pPing = new ParallaxSensors.Ping(shieldbase.Pins.GPIO_PIN_D5, 1000, true);
pPing.RangeEvent += new ParallaxSensors.Ping.RangeTakenDelegate(pPing_RangeEvent);
Thread.Sleep(Timeout.Infinite);
}
public static void pPing_RangeEvent(object sender, ParallaxSensors.PingEventArgs e)
{
Debug.Print("Range: " + e.Distance + " cm");
}
It seems to be failing on line 72 of the code posted by afulki, but I can't figure out why.
_port = new TristatePort(pin, false, false, ResistorModes.Disabled);
This is the stack trace information for the error:
Hi QuantumPhysGuy,
Is the pin being used already, by any chance?
We're passing exceptions via GoBus--but only the root Exception class. We'll be adding the others soon as well so you can get full exception details.
If you create a TristatePort for that pin directly from your code...do you also get the exception?
Chris
Okay, we may have introduced a bug with TristatePort with the GoBus 1.5 transition. I know we tested it but I will check our test code to see what we missed...
Chris
I get nearly the same error:
this.portOut = new TristatePort(this.pinOut, true, false, Port.ResistorMode.Disabled);
Throws System.Exception in GoBusSerialTransport.dll
Callstack:
GoBusSerialTransport.dll!GoBus.Utility.CRC8.SendDataPacket Line 1009 + 0xcf bytes
NetduinoGo.ShieldBase.dll!NetduinoGo.ShieldBase.CreateTristatePort(Microsoft.SPOT.Hardware.Cpu.Pin portId, bool initialState, bool glitchFilter, Microsoft.SPOT.Hardware.Port.ResistorMode resistor) Line 316 + 0x5d bytes
[External Code]
MyCode
The line that throws exception is the closing bracket in SendDataPacket...
And this time I checked the dll-versions:
Shieldbase Beta 4
GoBusSerialTransport 1.4.1.0
NetduinoGo.Shieldbase 0.3.0.0
GoBus 1.0
Running .NET MF 4.2 QFE2
edit: The pin is not in use. I've tried several different pins - D6, D7, D11, D12 to be specific.
edit 2: It's the same scenario when I have nothing else initlialized on the Shieldbase.
ntools TCP Listener (Beta) · FTP Server (Alpha) Netduino Plus Go Module · Xml Parser http://ntools.codeplex.com/
Hi eplaksienko,
No resolution on this one quiet yet. This is in our issue tracking system and on the list but hasn't made it all the way to the top quite yet.
Chris
Chris, do you have any idea on when this will be worked on? I have a DHT22 and DHT11 that I am using the Tristate port to communicate with the device on.
Is there any workaround available for this bug right now? Perhaps any kind of beta library?
Greetings halobox
Is there any news to this bug?
Regards
halobox
Chris any news about it?
Chris, is it related to the issue with can not dispose OutportPort?
Chris, do you have any idea on when this will be worked on? I have a DHT22 and DHT11 that I am using the Tristate port to communicate with the device on.
Is there another alternative avalible?
Thanks in advance.
I'm sure that the second there is a solution Chris will post about it, until then probing him for updates simply requires him to spend time answering you rather than working to solve the problem.
Let me also take this opportunity to remind you all that the Shield Base is a beta product, and clearly labeled as such, don't expect it to work 100% until such time as it is no longer Beta.
Chris, do you have any idea on when this will be worked on? I have a DHT22 and DHT11 that I am using the Tristate port to communicate with the device on.
Is there another alternative avalible?
Thanks in advance.
Hi cgoss,
I'm not by my Shield Base at the moment, but what happens if you create an OutputPort and Dispose it and then create an InputPort when you need to switch (and vice-versa)?
This is near the top of our bugfix list. We're working our way to it, and if anyone else wants to attack it we can pull in that fix...
Chris I personally first tried to dispose OutputPort with the exception, then I tried to use TristatePort, and get the same kind of unknown exception. I am just trying to play with CharliePlexing