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