15,899,634 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 shan bala (Top 6 by date)
shan bala
18-Mar-14 8:31am
View
is it for c or?
shan bala
4-Mar-14 3:57am
View
hi,
Thanks, its working, can you explain the logic
shan bala
4-Mar-14 3:31am
View
Hi phil,
sorry,
bit by bit
and also byte by byte
int a=0x12 34 56 78
o/p
b=0x 78 56 34 12
shan bala
30-Jan-14 7:30am
View
hi richard ,
The digit is readsize of FD and the character is, i am receiving only one character from FD at a time, its printing in a newline because i have put \n in my printf inside the readport function
shan bala
4-Jan-14 1:52am
View
hi Griff,
thanks a lot, It really works, i just modify it according to my application
Thanks,
shan
shan bala
27-Nov-13 6:25am
View
hi richard,
I am having a serial port user space application to read the weight data from the weight machine, for that i have a buffer of size 100 and print the data byte by byte which read from the weight machine i got the output as follows
buffer[0] = 3
buffer[1] = .
buffer[2] = 0
buffer[3] = 9
The actual data is 3.09 which contains 4 bytes and a '\0', the output of the weight machine ascii string and this data is continuously sent by the weight machine
My problem is, i need to take 5-10 values and calculate the average for that, i want the logic on how can i make that 4 byte data as a single value for example:-
I am printing this buffer values as a %c
buffer[0] = 3
buffer[1] = .
buffer[2]= 0
buffer[3]= 9
buffer[5]= 3
buffer[6]= .
buffer[7]= 0
buffer[8]= 9
average= 3.09+3.09/2-----> This is what i want to do
Show More