public static void Main() { NetLog log1 = new NetLog(); log1.Host = "192.168.1.12"; log1.Port = 8000; log1.Print("100"); Thread.Sleep(500); log1.Print("400"); Thread.Sleep(500); log1.Print("200"); Thread.Sleep(500); log1.Print("500"); Thread.Sleep(500); log1.Print("300"); }...using the Microsoft Charting stuff, produces this graph:
Which makes me happy!
What is weird though is that sometimes, and only from initial boot or by pressing play is VS, the netduino never makes it past sending the first "100" and throws an exception for each of the subsequent sends:
#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (1) #### #### Message: #### Microsoft.SPOT.Net.SocketNative::connect [IP: 0000] #### #### System.Net.Sockets.Socket::Connect [IP: 001d] #### #### NetLogger.NetLog::Print [IP: 0042] #### #### NDP_SocketSender1.Program::Main [IP: 002d] #### #### SocketException ErrorCode = 10053 #### SocketException ErrorCode = 10053 A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll #### SocketException ErrorCode = 10053 #### SocketException ErrorCode = 10053
When the netduino is unable to connect to the forms app, I am able still able to connect to my forms application using telnet, so I know it's still responding. I am on the latest posted firmware.
I'm sure my code is a train wreck, so any advice would be very much appreciated. I don't doubt I'm doing something fundamentally wrong. My next step is to have the act of sending the data spun off into it's own thread. Here are my solution files:
I've been working up the nerve to take a stab at this for a while, eventually to start graphing data from the analog inputs. I was motivated to action after seeing Corey's 2d motion tracker w/ excel graphs using data cut/pasted from the debugger output... I was hoping I'd end up with something slightly useful for his Avatar motion project!
Thanks! --Bill