Jump to content
Sign in to follow this  
utterlygreat

trying to output to analog pins

Recommended Posts

I'm trying to output using pinMode (A0, OUTPUT) and digitalWrite(A0, HIGH), that is to use the analog pin as a digital out, but it doesn't work. I can find anything in the documentation or online related to this. 

 

Is it not possible or am I missing some essential issue?

Share this post


Link to post
Share on other sites

 @cwilt: I'm trying to raise A0 for a second using minimal code, nothing fancy, compiled with make. The code runs, but nothing happens.

#include <core.h>

void setup()
{
	pinMode(A0, OUTPUT);
}

void loop()
{
	digitalWrite(A0, HIGH);
	delay(1000);
	digitalWrite(A0, LOW);
}

@youkee: That essentially means A0 - A5 cannot be used as outputs, only inputs. Right?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×