pin mapping question...

Hello,

For the control of a Animatronic Lion, I need to run 13 digital servos but Uno only provides 12 outputs.
I understand that via pin mapping I can re-map some ports...?

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

This is what I found in the tutorials but have no clue how to use it within the sketch I am using...
(Sketch found at http://animatronicsworkshop.com/?page_id=458)

I use the professional VSA software from www.brookshiresoftware.com to do the animation.

I build a small test setup, running several servos and that works like a charm...now I found out I need 13 channels instead of 12 but still want to use the Uno.

Can anyone help me to change the sketch? (I have no expertise in programming)

Thanks in advance!

Installation & Troubleshooting -
For problems with Arduino itself, NOT your project

Step one would be to read the How To Use This Forum post and put your question in the right section. Don't be afraid to read. The tendency to read things first and THEN write is what separates the good programmers from those who just won't ever make it.

Miaauw!

I did read and choose to post it here...I don't have the ambition to become a programmer at all.
Sorry if I did something wrong or ruined your day! :slight_smile:
Where should I post this then?

Probably programming questions or project guidance. But if you leave it here you won't get many responses.

It has nothing to do with pin mapping. What you need to understand is that the pins labeled as A0, etc. can also be used as digital pins, they just have the additional special attribute of the analogRead() capability. This means the Uno actually has 22 digital IO pins but it's usually a good idea to avoid using pins 0 and 1 because those pins are also used for uploading sketches and printing to the Serial Monitor.

Unfortunately the standard Servo library limits you to 12 servos on the Uno. From https://www.arduino.cc/en/reference/servo:

The Servo library supports up to 12 motors on most Arduino boards and 48 on the Arduino Mega.

You may be able to find an alternate library that allows you to use more than 12 servos on the Uno.

Clones on ebay.
Leo..

Thanks, I will re-post in project guidance then I guess...

Re-posting is a bad idea, that's cross posting which is against the rules here. Instead, click the "Report to moderator" link at the bottom of your post and ask the moderator nicely if they'll move the thread. In the future, before posting please take a minute to look through the forum sections to find the most appropriate one.