Go Down

Topic: Problems in TX/RX data between C# and Arduino (Read 5207 times) previous topic - next topic

Reynal74

by the way, how would you approach garbage packet "<N0TRaSH" or missing ">". I know my the code will hang in those two cases.
If you think you have it, you don't. If you think you don't have it, you still don't.

PaulS


Reynal74

In order to make my program more fault tolerant, should i do it in both?
If you think you have it, you don't. If you think you don't have it, you still don't.

PaulS

Quote
In order to make my program more fault tolerant, should i do it in both?

Yes. You are sending data to the Arduino. It needs to check the integrity of the data it received, before doing something with it.

You are sending data from the Arduino. The C# application should check the integrity of the data it received, before doing something with it.

Reynal74

If you think you have it, you don't. If you think you don't have it, you still don't.

Graynomad

#35
Dec 19, 2010, 03:11 am Last Edit: Dec 19, 2010, 03:13 am by graynomad Reason: 1
Quote
Quote:
I just needed to set N = 0 before the while loop.
Ah, yes. The little things that trip you up.


Reynal had

Code: [Select]
while(N <= atoiHolder) {
 // do stuff
   N = N + 1; //Incrementing the N-Domain
}


which worked the first time but N was never reset to 0 so the while test failed on subsequent iterations.

Oops, just realised I responded to a post on page 2.

______
Rob

Rob Gray aka the GRAYnomad www.robgray.com

Reynal74

I'm an total amateur coding hehe. If it wasn't for the help I wouldn't be able get nowhere. I just got caught up in final exams  :'( , I'm dying to go back to Arduino. One more week, one more week.
If you think you have it, you don't. If you think you don't have it, you still don't.

Go Up