CODE for "continuity test"

Hello
I want to test the continuity of 25 wires using an Arduino and need to develop a code for the test run.
My requirements are:

  1. During the test run, the system should detect and indicate if there is a short circuit.
  2. If there are no shorts, the test should sequentially check wires 1, 2, 3... up to 25 and confirm 'PASS' for each wire

Search for "Ardino cable tester".

i need help with a code for this my arduino type mega

See post 2

but need to find the specification of info

Try to solve the problem for a cable consisting of just ONE wire with one end of the wire connected to say Mega pin 2 and the other end connected to pin 3. Get that working and scale it up.

1 Like

What specification, what info. Try explaining what you want in complete sentences and paragraphs. If you are not confident in English, write it in your native language then goto Google translate and translate to English.

If you are expecting someone here to write your sketch for you, you will very likely be disappointed.

1 Like

Your specifications are in your instructions in Post #1 (25 wires, Arduino).

  1. Decide which pins you will be using on the Arduino.
  2. configure all pins for input
  3. configure ONE pin for output
  4. set the ONE pin to HIGH
  5. monitor all pins
  6. if more than one pin is HIGH, there is a short
  7. decide how to exit
  8. go to 2.
  9. profit

You need to detect short between wires or wire breakage (open) ?

Do you need someone to write the code for you?
If so, ask a moderator to move your thread to the Jobs and Paid Consultancy category

Trying to find some info to start the code

i need to test cable with 25 wires just continuity , but if there is short i need have to know its solve .

can you display example ?
how the code will be looks choose GPIO random .
it can help me to understand the Continue

That is a "pseudo code" that helps you write the code.

No, "sequential" (in order).

I changed my mind on INPUT versus INPUT_PULLUP.

1 Like

Won't most of the other students who have been given this assignment be using ChatGPT or similar AI to solve it ?

Start simple and ask it to write an Arduino mega sketch to test the continuity of one wire.

When you can verify that it works, ask it to do the same with 2 wires and also check for any possible short circuit between the two wires. Ask it to write a user manual and a test schedule so you can verify it works.

Once you have it working with 2 wires, Start scaling up to the maximum number of wires in this exercise.

  • This was discussed in March and April, more wires requires extra 74HC4067 muxes.

Mega2560 has 25 pins available.

For 25 wires, with short circuit and continuity detection, 50 Arduino/GPIO pins are, as far as I see, required.

Yes. I was only checking for shorts.