Topic: Serial Communication
(Read 504 times)
Jul 06, 2011, 01:20 pm
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
Scattered showers my arse -- Noah, 2348BC.
Re: Serial Communication
Jul 06, 2011, 01:26 pm
: Jul 06, 2011, 01:28 pm by Graynomad
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
send as two bytes, if <= 255 you can send a one byte
Rob Gray aka the GRAYnomad