Pages: [1]   Go Down
Author Topic: CapSense Library using Analog pins  (Read 921 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,
I wonder if we can use Analog pins for CapSense Library or not. My hardware is fixed so I can't change it to digital pins.
http://playground.arduino.cc//Main/CapacitiveSensor
Thanks
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,
I wonder if we can use Analog pins for CapSense Library or not. My hardware is fixed so I can't change it to digital pins.
http://playground.arduino.cc//Main/CapacitiveSensor
Thanks

I have no experiance with that specific library, but as a general statement you are free to use analog inputs as digital pins freely in a sketch as example.

Code:
digitalRead(A0);   //returns a digital HIGH or LOW on analog pin 0.
digitalWrite(A0, LOW);  // output a digital LOW (0vdc) on analog pin 0.
digitalWrite(A0, HIGH); // output a digital HIGH (+5vdc) on analog pin 0.

Lefty
Logged

Pages: [1]   Go Up
Jump to: