Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Am I on the right track? ... that depends on whether pins 1 and 2 are supposed to be shorted together Commented May 21, 2021 at 0:16
  • 1
    write down the exact step-by-step procedure in great detail ... the resulting description will translate to code almost directly, if you include enough detail Commented May 21, 2021 at 0:19
  • @jsotola yes, done Commented May 21, 2021 at 3:11
  • if that is the most detailed description that you can write down, then you have a lot of thinking to do ... tests pin 1 - 2 to see if they're connected is not anywhere near one line of code ......... a cable has two ends ... call them left and right ... I am talking about a description something like, set each pin on left as inputs, set each pin on right as inputs, set left pin 1 to output, output LOW on left pin 1, check state of right pin 1 ...... Commented May 21, 2021 at 4:45
  • Do you consider shortcuts as an error? Then you need to check for them, too. -- At least in the history of computer cables, there are a several variants that have connections between two (or more) pins on the same side, without being connected to the other side. -- Other cables might connect one pin of one side to multiple pins on the other side, for example for ground. -- Some USB charger cables have resistors between pins that must fall into a certain range. -- You see, this task is not trivial, if you like to check non-trivial cables. Commented May 21, 2021 at 9:49