Click here to Skip to main content
15,886,110 members
Home / Discussions / C#
   

C#

 
GeneralRe: Merge Sort linked list Pin
Member 1431822320-Apr-19 9:12
Member 1431822320-Apr-19 9:12 
Questionrecieveing and splitting serial data from Arduino in C# Pin
auting8219-Apr-19 7:07
auting8219-Apr-19 7:07 
AnswerRe: recieveing and splitting serial data from Arduino in C# Pin
Gerry Schmitz19-Apr-19 9:20
mveGerry Schmitz19-Apr-19 9:20 
GeneralRe: recieveing and splitting serial data from Arduino in C# Pin
auting8219-Apr-19 10:02
auting8219-Apr-19 10:02 
GeneralRe: recieveing and splitting serial data from Arduino in C# Pin
Gerry Schmitz19-Apr-19 11:32
mveGerry Schmitz19-Apr-19 11:32 
AnswerRe: recieveing and splitting serial data from Arduino in C# Pin
Luc Pattyn19-Apr-19 11:00
sitebuilderLuc Pattyn19-Apr-19 11:00 
GeneralRe: recieveing and splitting serial data from Arduino in C# Pin
auting8219-Apr-19 11:36
auting8219-Apr-19 11:36 
GeneralRe: recieveing and splitting serial data from Arduino in C# Pin
Luc Pattyn19-Apr-19 11:52
sitebuilderLuc Pattyn19-Apr-19 11:52 
Hi,

I've thrown out most all of your code! My code example replaces everything (it still needs port initialization). Under the assumptions I made (master-slave operation, PC sends command then peripheral replies), there is no need for events, secondary threads, Invoke, etc.

If you can't turn your peripheral into a slave, which would mean it can still send results whenever it likes, then you need more of your code, however even then a delay could save your day: put it anywhere between the start of the DataReceived event and the line that holds SerialPort.ReadLine; this would guarantee (actually increase the probability) that an entire message up to and including newline is present in the serial buffer when ReadLine gets called. However now the delay also increases the probability that you would loose a message, so it makes sense to opt for a shorter delay (I would at first not go below 20 msec though).

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: recieveing and splitting serial data from Arduino in C# Pin
auting8224-Apr-19 7:34
auting8224-Apr-19 7:34 
GeneralRe: recieveing and splitting serial data from Arduino in C# Pin
Luc Pattyn24-Apr-19 8:37
sitebuilderLuc Pattyn24-Apr-19 8:37 
GeneralRe: recieveing and splitting serial data from Arduino in C# Pin
auting8224-Apr-19 9:45
auting8224-Apr-19 9:45 
GeneralRe: recieveing and splitting serial data from Arduino in C# Pin
Luc Pattyn24-Apr-19 10:05
sitebuilderLuc Pattyn24-Apr-19 10:05 
Questionrecieveing and splitting serial data from Arduino in C# Pin
auting8219-Apr-19 6:04
auting8219-Apr-19 6:04 
Questionsample application to customize combo box with multi selection an check box in winform Pin
ambili3018-Apr-19 0:18
ambili3018-Apr-19 0:18 
AnswerRe: sample application to customize combo box with multi selection an check box in winform Pin
Richard MacCutchan18-Apr-19 1:09
mveRichard MacCutchan18-Apr-19 1:09 
AnswerRe: sample application to customize combo box with multi selection an check box in winform Pin
Eddy Vluggen18-Apr-19 1:21
professionalEddy Vluggen18-Apr-19 1:21 
AnswerRe: sample application to customize combo box with multi selection an check box in winform Pin
OriginalGriff18-Apr-19 3:43
mveOriginalGriff18-Apr-19 3:43 
GeneralRe: sample application to customize combo box with multi selection an check box in winform Pin
#realJSOP18-Apr-19 8:00
mve#realJSOP18-Apr-19 8:00 
GeneralRe: sample application to customize combo box with multi selection an check box in winform Pin
OriginalGriff18-Apr-19 8:05
mveOriginalGriff18-Apr-19 8:05 
GeneralRe: sample application to customize combo box with multi selection an check box in winform Pin
Dave Kreskowiak18-Apr-19 8:55
mveDave Kreskowiak18-Apr-19 8:55 
AnswerRe: sample application to customize combo box with multi selection an check box in winform Pin
Gerry Schmitz18-Apr-19 6:12
mveGerry Schmitz18-Apr-19 6:12 
GeneralRe: sample application to customize combo box with multi selection an check box in winform Pin
OriginalGriff18-Apr-19 6:34
mveOriginalGriff18-Apr-19 6:34 
QuestionHow store all TabPage items in c# Pin
Richi38117-Apr-19 22:58
Richi38117-Apr-19 22:58 
AnswerRe: How store all TabPage items in c# Pin
OriginalGriff17-Apr-19 23:34
mveOriginalGriff17-Apr-19 23:34 
AnswerRe: How store all TabPage items in c# Pin
#realJSOP18-Apr-19 2:18
mve#realJSOP18-Apr-19 2:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.