Go Down

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

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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy