-
Notifications
You must be signed in to change notification settings - Fork 2
Arduino getting input from sensors
Pekka Nikander edited this page May 24, 2013
·
1 revision
[Outline material to be received from Matti Ruusunen]
Arduino-compatible platforms support both digital and analog input. In most environments, both the digital pins (D0-D13) and the analog pins (A0-A5) may be configured as digital input, but only the analog pins may be configured as analog input pins.
Please note that it is a good programming practise to always name your pins within the application, instead of using the pin numbers directly. For example, to use A0 as an analog input to read a temperature, it would make sense to declare the pin in the beginning of the Arduino sketch:
static const int TEMPERATURE_INPUT = A0;