I can see this as a educational test/project its checking your programing and electronic skills.
Can you please tell us your electronics, programming, arduino, hardware experience?
What range of resistance?
What diode parameters, forward volt drop, go/nogo checking if diode short or open circuit?
Google;
arduino ohm meter
Goolge;
arduino diode tester
These will help you with the measurement method research @hammy has described.
Tom....
![]()