art364

 

Serial Sensor Test

Page history last edited by Brian 2 yrs ago

Serial Sensor Test

Want to know what value that sensor is returning back? Use this program to see what that sensor sees. This program uses the Serial.println command to send the value of pin 0 back to the computer. Use the "Serial Monitor" button to see the values being sent to the computer every 1 second.

 

/*  Sensor Tester
    Basic Serial Communication
    Sometimes its neccy to test an analog sensor
    to find the values that it provides.
*/

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.println(analogRead(0));
  delay(1000);
}

Comments (0)

You don't have permission to comment on this page.