15,898,222 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Jesús Álvarez (Top 7 by date)
Jesús Álvarez
2-Dec-15 8:05am
View
Deleted
thanks George, i have a problem with that
<pre lang="C#">if (serialPort.BytesToRead > 13) // For example
{
string data = serialPort.ReadLine();
//data+="F";
// The F is not included in the data so if you need it you have to add it again
// data += "F";
// Do your stuff
if (data.ToCharArray().Count() == 13)
{
dataArray = Encoding.ASCII.GetBytes(data);
dataArray.ToList().ForEach(b => recievedData.Enqueue(b));
processData();
LineReceived(this, new LineReceivedEventArgs(dataArray));
}
}</pre>
with this line i think
<pre lang="C#">dataArray = Encoding.ASCII.GetBytes(data); </pre>
dato: 68---65---84---1---3---63---1---1---1---122---1---1---63---
dato: 68---65---84---1---3---63---1---1---1---123---1---1---63---
dato: 68---65---84---1---3---63---1---1---1---124---1---1---63---
dato: 68---65---84---1---3---63---1---1---1---125---1---1---63---
dato: 68---65---84---1---3---63---1---1---1---126---1---1---63---
dato: 68---65---84---1---3---63---1---1---1---127---1---1---63---
dato: 68---65---84---1---3---63---1---1---1---
63
---1---1---107--- this will be 128
dato: 68---65---84---1---3---63---1---1---1---63---1---1---106---
dato: 68---65---84---1---3---63---1---1---1---63---1---1---105---
dato: 68---65---84---1---3---63---1---1---1---63---1---1---104---
dato: 68---65---84---1---3---63---1---1---1---63---1---1---111---
dato: 68---65---84---1---3---63---1---1---1---63---1---1---110---
dato: 68---65---84---1---3---63---1---1---1---63---1---1---109---
Jesús Álvarez
2-Dec-15 3:20am
View
That is the data (frame) i receive (always 14 bytes):
68 -->'D'
65 -->'A'
84 -->'T'
0
127 Xh
254 Xl
0
0
115 Yh
51 Yl
5
0
196
70 -->'F'
i do the job with this, (127254) is my X value and 11551 my Y value, i use these to plot it in a chart,my hardware now is sending frames continuosly
x = 1 y = 0,001 'D' 'A' 'T'.............'F'
x = 2 y = 0,002 'D' 'A' 'T'.............'F'
x = 3 y = 0,003 'D' 'A' 'T'.............'F'
All data with this 'D' 'A' 'T'.............'F' frame format is interesting for me, and continuosly read.
Jesús Álvarez
2-Dec-15 2:38am
View
i don konw how to stop firing event when i receive 14 bytes
Jesús Álvarez
1-Dec-15 11:50am
View
ok, i am going to implement (if i can) yesterday then tell you a feedback. thanks
Jesús Álvarez
1-Dec-15 9:28am
View
how can i do that?, how to force continuosly reading?
Jesús Álvarez
9-Oct-15 5:08am
View
can you explain me an example?
Jesús Álvarez
7-Oct-15 6:59am
View
I do that
Show More