My Class has been testing several analog sensors. The serial connection is hard to work with in a classroom setting, but the particle console is really useful. This little generic analog sensor program has become a necessity.
// Easiest Analog Console test program
// By Jeremy Ellis
// lots of sensors have these labels
// GND Ground
// VCC Normal 5Vin check board may want 3V3
// NC Not Connected - might be label LED
// Sig Connect to A0
void setup() {
}
void loop() {
int myReadA0= analogRead(A0);
String myA0 = String(myReadA0,DEC);
Particle.publish("Analog Read", String("A0 = " + myA0), 60, PRIVATE);
delay(6000); // wait about 6 seconds
}