mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Changed analog references to use new A0 through A5 notation
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
|
||||
created 2 Jul 2008
|
||||
by David A. Mellis
|
||||
modified 26 Jun 2009
|
||||
modified 4 Sep 2010
|
||||
by Tom Igoe
|
||||
|
||||
This example code is in the public domain.
|
||||
@ -29,9 +29,9 @@
|
||||
// these constants describe the pins. They won't change:
|
||||
const int groundpin = 18; // analog input pin 4 -- ground
|
||||
const int powerpin = 19; // analog input pin 5 -- voltage
|
||||
const int xpin = 3; // x-axis of the accelerometer
|
||||
const int ypin = 2; // y-axis
|
||||
const int zpin = 1; // z-axis (only on 3-axis models)
|
||||
const int xpin = A3; // x-axis of the accelerometer
|
||||
const int ypin = A2; // y-axis
|
||||
const int zpin = A1; // z-axis (only on 3-axis models)
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
created 25 Mar 2007
|
||||
by David Cuartielles <http://www.0j0.org>
|
||||
modified 30 Jun 2009
|
||||
modified 4 Sep 2010
|
||||
by Tom Igoe
|
||||
|
||||
This example code is in the public domain.
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
// these constants won't change:
|
||||
const int ledPin = 13; // led connected to digital pin 13
|
||||
const int knockSensor = 0; // the piezo is connected to analog pin 0
|
||||
const int knockSensor = A0; // the piezo is connected to analog pin 0
|
||||
const int threshold = 100; // threshold value to decide when the detected sound is a knock or not
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user