File tree 2 files changed +6
-37
lines changed
build/shared/examples/3.Analog 2 files changed +6
-37
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
/*
2
2
Calibration
3
3
4
- Demonstrates one techinque for calibrating sensor input. The
4
+ Demonstrates one technique for calibrating sensor input. The
5
5
sensor readings during the first five seconds of the sketch
6
6
execution define the minimum and maximum of expected values
7
7
attached to the sensor pin.
8
8
9
- The sensor minumum and maximum initial values may seem backwards.
9
+ The sensor minimum and maximum initial values may seem backwards.
10
10
Initially, you set the minimum high and listen for anything
11
- lower, saving it as the new minumum . Likewise, you set the
11
+ lower, saving it as the new minimum . Likewise, you set the
12
12
maximum low and listen for anything higher as the new maximum.
13
13
14
14
The circuit:
27
27
*/
28
28
29
29
// These constants won't change:
30
- const int sensorPin = A0 ; // pin that the sensor is attached to
30
+ const int sensorPin = A0 ; // pin that the sensor is attached to
31
31
const int ledPin = 9 ; // pin that the LED is attached to
32
32
33
33
// variables:
34
34
int sensorValue = 0 ; // the sensor value
35
- int sensorMin = 1023 ; // minimum sensor value
36
- int sensorMax = 0 ; // maximum sensor value
35
+ int sensorMin = 1023 ; // minimum sensor value
36
+ int sensorMax = 0 ; // maximum sensor value
37
37
38
38
39
39
void setup () {
You can’t perform that action at this time.
0 commit comments