Hi All,
I just got my Freeduino USB host board, set it up with my Nexus One phone and the Google Demos are working. Moving forward, I would like the board to read an analogue input and then send it to the Android App.
I am new to Arduino, which pins should I use? Also should I be calling analogRead() somewhere on the demo sketch?
Any pointers would be greatly appreciated.
Thanks!
Ferd
			
			
			
									
									
						Reading Analog input
Re: Reading Analog input
Ferd,
It's dead simple, and you probably figured this out by now but here it is.
of course you can declare the variable separately from using it.
Paul
			
			
			
									
									
						It's dead simple, and you probably figured this out by now but here it is.
Code: Select all
int results = analogRead(A0);  // 10 bit A/D read is now in resultPaul