Pages: [1]   Go Down
Author Topic: Serial Communication  (Read 412 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'd like to know if it is possible to use Arduino to read an analog input (Voltage) and send it to the computer as a byte or high byte/low byte combination instead of an integer as i think that it will accelerate the process . If it is possible what functions can i use to do it?
I'm currently using analogRead to get the voltage values and the Serial.print function to write them to the serial port but i'm having problems when I'm not using a delay of around 100ms to do it. Which is pretty slow. Any suggestions thanx

nr Bundaberg, Australia
Offline Offline
Tesla Member
Karma: 129
Posts: 8589
Scattered showers my arse -- Noah, 2348BC.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It sounds like you're basically doing the right thing but you shouldn't need any delays. Post your code, there has to be a problem in it somewhere.

high byte/low byte combination
If the value is > 255 you have to send as two bytes, if <= 255 you can send a one byte

« Last Edit: July 06, 2011, 06:28:34 am by Graynomad » Logged

Rob Gray aka the GRAYnomad

Pages: [1]   Go Up
Jump to: