Skip to content

Instantly share code, notes, and snippets.

@biskandar
Created October 16, 2012 09:00
Show Gist options
  • Save biskandar/3898162 to your computer and use it in GitHub Desktop.
Save biskandar/3898162 to your computer and use it in GitHub Desktop.
Reading Arduino's Analog Pins with JSON Protocol by using WiFi Shield 2012101603
void readAnalogs() {
for ( int idxAnalogs = 0 ; idxAnalogs < maxAnalogs ; idxAnalogs++ ) {
arrAnalogs[idxAnalogs] = analogRead( idxAnalogs ) ;
}
}
void infoAnalogs() {
Serial.print( "[" ) ;
Serial.print( millis() ) ;
Serial.print( "] Analogs : " ) ;
for ( int idxAnalogs = 0 ; idxAnalogs < maxAnalogs ; idxAnalogs++ ) {
Serial.print( arrAnalogs[idxAnalogs] ) ;
Serial.print( " " ) ;
}
Serial.println() ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment