Go Down

Topic: Serial Communication (Read 769 times) previous topic - next topic


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


Jul 06, 2011, 01:26 pm Last Edit: Jul 06, 2011, 01:28 pm by Graynomad Reason: 1
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

Rob Gray aka the GRAYnomad www.robgray.com

Go Up