-2

Problem: I've made a circuit consisting of an 8x8 led matrix, which uses all of the digital pins on the Arduino UNO board, and I want to add an LED too it.

I tried looking around the internet but so far, I have not seen any solution on how to use a simple LED with no digital pins to spare.

So I ask, is it possible to connect an LED with no leftover digital pins? I just want to be able to turn the LED on and off.

Thanks.

1

Just found this:

https://forum.arduino.cc/index.php?topic=311099.0

Turns out you can use the analog pins of an Arduino UNO using this:

pinMode(A1,OUTPUT);
digitalWrite(A1,HIGH);

You just have to list it as an analog pin. Seems to be working, don't think there are any downsides, as far as I see.

3
  • Yup. Though make sure you see the note there by CrossRoads regarding A6 and A7 on SMT based UNO (and other SMT 328P Arduino).
    – timemage
    Dec 28 '20 at 1:41
  • 1
    In a couple days time you'll be able to accept your own answer, and probably should assuming someone else doesn't provide another you like better.
    – timemage
    Dec 28 '20 at 1:44
  • Ok, yeah I'll do that later, unless I get a better answer as you said.
    – John Doe
    Dec 28 '20 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.