Only 11 pins working on Nano

Hello - new to the forum.. Sorry of but in.. I have a digital data output problem that is I can only get 11 working on my Arduino Nano. But..

While I do want to post this question I find the only button on my Actions page is [Message] and I discovered that is not how to start a post? regards

Welcome to the forum

Your post has been split from the topic that you posted to and put into its own topic

To start a new topic you should have chosen the appropriate category then clicked the New Topic button top/right of the screen

image

Please give more details of your problem and post the sketch that you are running. Use code tags when posting the code

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

Here is a sketch to check your digital inputs... instructions included...

//**********************************************************************
// 1. Connect a jumper wire to GND
// 2. Upload the sketch
// 3. Touch the jumper wire to any pin 2 through 12 and A0 through A5
// 4. The output will show the pin(s) you are touching
//
// This shows pin D3 sensing ground through jumper...
// 12 11 10 D9 D8 D7 D6 D5 D4 D3 D2 A0 A1 A2 A3 A4 A5
//  1  1  1  1  1  1  1  1  1  0  1  1  1  1  1  1  1
//**********************************************************************

// I/O pins for the Uno/Nano, adjust for your board
int pin[] = {13, 12, 11, 10, 9, 8,  7, 6, 5, 4, 3, 2, 14, 15, 16, 17, 18, 19};
int size = sizeof(pin) / sizeof(pin[0]);

void setup() {
  Serial.begin(115200);
  for (int i = 0; i < size; i++) {
    pinMode(pin[i], INPUT_PULLUP); // pins held HIGH through internal 10k resistor
  }
}

void loop() {
  int size = sizeof(pin) / sizeof(pin[0]);
  Serial.println(F(" 13 12 11 10 D9 D8 | D7 D6 D5 D4 D3 D2 | A0 A1 A2 A3 A4 A5"));
  for (int i = 0; i < size; i++) {
    int state = digitalRead(pin[i]);
    if (i == 6 || i == 12)
      Serial.print(" |  ");
    else
      Serial.print("  ");
    Serial.print(state);
  }
  Serial.println();
  delay(1000);  // allow jumper to be moved before scrolling off the page
}
1 Like

More information, is this a new unit or has it been used in other project. Post an annotated schematic showing exactly how you have wired it. Show all grounds, power sources and any components such as resistors etc. There is a difference between a schematic and a wiring diagram. The schematic is the language of electronics.

How did you test them? Please show the code and wiring

Thank you..

You have still not said what evidence you have that only 11 pins are working or how you tested them

Hey thank you this was very good of you.. I am actually fairly sure the chip is ok because I have others to substitute and get the same.

I was also told that by using radio meant pins D9, D10, D11 and D13 would not be available and since the stepper controller uses D2, D5, D8 I am stuck with 11 only. So my solution is to use digital output to A0 - A5 and use pins D2, D4, D6 to send a binary digit to another slave Arduino which also runs A0 - A5 as digital output giving me 12 with no need for transistor switching to drive 12 relays. But right now I have a bigger problem my stepper motor has just failed!

Regards

Thank you.. but it turned out to be because I was using RF comms and driving a stepper motor that pins D2, D5, D8, D9, D10, D11, D13 are not available. So I am going to try sending out a binary number on pins D3, D4, D6 to be read and processed by another arduino nano which can drive another 6 outputs. Can I connect the digital out of one ard-chip to a digital in on another?
regards

I was also told that by using radio meant pins D9, D10, D11 and D13 would not be available and since the stepper controller uses D2, D5, D8 I am stuck with 11 only. So my solution is to use digital output to A0 - A5 and use pins D2, D4, D6 to send a binary digit to another slave Arduino which also runs A0 - A5 as digital output giving me 12 with no need for transistor switching to drive 12 relays. But right now I have a bigger problem my stepper motor has just failed!

I was also told that by using radio meant pins D9, D10, D11 and D13 would not be available and since the stepper controller uses D2, D5, D8 I am stuck with 11 only. So my solution is to use digital output to A0 - A5 and use pins D2, D4, D6 to send a binary digit to another slave Arduino which also runs A0 - A5 as digital output giving me 12 with no need for transistor switching to drive 12 relays. Can I connect digital outputs on one Arduino directly to digital inputs on another?

But right now I have a bigger problem my stepper motor has just failed!

It seems that what you really mean is that you don't have enough pins to do what you want, not that only 11 pins are working

You have not mentioned a radio before. Which module do you have ?

You have not mentioned a stepper before. Which stepper board are you using ?

Can you see how it is important to provide full information in order to get help ?

Cross post to this thread:

This Topic has been locked as it is the identical or too similar your other topic.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

1 Like