| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Serial Sensor Test

Page history last edited by PBworks 16 years, 8 months 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.