I am using an ethernet shield together with a genuino mega 2560 to read sensor outputs so i set all pins as input. When block sensor i will get a “0” and unblock sensor i will get a “1” in return.
I was learnt that pin 10, 50, 51 and 52 cannot be used as they are specially for ethernet connection. However, i found that there are more pins cannot be used for sensor output reading like pin 4, 13, 20, 21, 53, A0 and A1. The values i get from those pins are always fixed and never change no matter i block or unblock my sensor.
Could anyone please help? Thank you. (sketch is attached)
Read_Sensor_Trial2.ino (10.2 KB)