Go Down

Topic: CapSense Library using Analog pins (Read 1 time) previous topic - next topic

vinasheva

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

retrolefty


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: [Select]
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

Go Up