0% found this document useful (0 votes)
30 views3 pages

Professional (HTTPS://WWW - Arduino.Cc/Pro) Education (HTTPS://WWW - Arduino.Cc/Edu) Store (Https://Store - Arduino.Cc/)

The document contains code for calibrating sensor input readings. It defines the minimum and maximum expected sensor values during the first five seconds after starting the sketch. It initially sets the minimum high and maximum low, then listens for any lower/higher values to update the minimum/maximum thresholds accordingly. The circuit includes an analog sensor connected to analog pin 0 and an LED on digital pin 9.

Uploaded by

Penouel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

Professional (HTTPS://WWW - Arduino.Cc/Pro) Education (HTTPS://WWW - Arduino.Cc/Edu) Store (Https://Store - Arduino.Cc/)

The document contains code for calibrating sensor input readings. It defines the minimum and maximum expected sensor values during the first five seconds after starting the sketch. It initially sets the minimum high and maximum low, then listens for any lower/higher values to update the minimum/maximum thresholds accordingly. The circuit includes an analog sensor connected to analog pin 0 and an LED on digital pin 9.

Uploaded by

Penouel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

PROFESSIONAL EDUCATION STORE (HTTPS://STORE.ARDUINO.

CC/)
(HTTPS://WWW.ARDUINO.CC/PRO) (HTTPS://WWW.ARDUINO.CC/EDU)

NO.CC/EN/MAIN/PRODUCTS) SOFTWARE DOCUMENTATION COMMUNITY BLOG (HTTPS://BLOG.ARDUINO.CC/) ABOUT (HTTPS://WWW.ARDUIN


PROFESSIONAL EDUCATION STORE (HTTPS://STORE.ARDUINO.CC/)
(HTTPS://WWW.ARDUINO.CC/PRO) (HTTPS://WWW.ARDUINO.CC/EDU)

NO.CC/EN/MAIN/PRODUCTS) SOFTWARE DOCUMENTATION COMMUNITY BLOG (HTTPS://BLOG.ARDUINO.CC/) ABOUT (HTTPS://WWW.ARDUIN

Calibration OP EN C ODE

Calibration.ino Calibration.txt layout.png schematic.png

1 ▾ /*
2 Calibration
3
4 Demonstrates one technique for calibrating sensor input. The sensor readings
5 during the first five seconds of the sketch execution define the minimum and
6 maximum of expected values attached to the sensor pin.
7
8 The sensor minimum and maximum initial values may seem backwards. Initially,
9 you set the minimum high and listen for anything lower, saving it as the new
10 minimum. Likewise, you set the maximum low and listen for anything higher as
11 the new maximum.
12
13 The circuit:
14 - analog sensor (potentiometer will do) attached to analog input 0
15 - LED attached from digital pin 9 to ground
16
17 created 29 Oct 2008
18 by David A Mellis
19 modified 30 Aug 2011
20 by Tom Igoe
21
22 This example code is in the public domain.
23
PROFESSIONAL EDUCATION STORE (HTTPS://STORE.ARDUINO.CC/)
(HTTPS://WWW.ARDUINO.CC/PRO) (HTTPS://WWW.ARDUINO.CC/EDU)

NO.CC/EN/MAIN/PRODUCTS) SOFTWARE DOCUMENTATION COMMUNITY BLOG (HTTPS://BLOG.ARDUINO.CC/) ABOUT (HTTPS://WWW.ARDUIN

NEWSLETTER

SUBSCRIBE

You might also like