Nano or Uno
Is there a method to do println to show status of IO pins. ie. A1 yes, A2 Yes, A3 No, etc
Thanks
Nano or Uno
Is there a method to do println to show status of IO pins. ie. A1 yes, A2 Yes, A3 No, etc
Thanks
There's no way for the board to know whether or not you've connected anything to the pin. But you can certainly write code on the Arduino to output the status of every pin.
Serial.print("Digital 2 : ");
Serial.println(digitalRead(2));
Serial.print("Digital 3 : ");
Serial.println(digitalRead(3));
etc. etc.
However this will just read noise for unconnected pins. There's no way for the board to know whether or not you've connected anything.
This is a detail-question that - of course - can be answered like above.
But this detail-question has a bigger question behind it or a problem that you want to solve.
You should describe the real problem and your real final aim.
I'm pretty sure that there are better ways to solve the real problem than with printing IO-pin-states
best regards Stefan
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.