-->
Page 1 of 1

Check if sensor is physically connected to the ESP8266

PostPosted: Sun Aug 05, 2018 8:39 pm
by YArkoba4i
Hi guys,

Is there a way to check if pin has physical connection to a sensor?

The idea is to check if sensor is connected and then initialize it and try to read data from it. Other than assume that it's connected and in fact it's not.

Thanks !!!

Re: Check if sensor is physically connected to the ESP8266

PostPosted: Thu Aug 09, 2018 8:19 am
by PtrO
You could try reading the GPIO using the (programmed) pull-up value and see if its reading value is different then expected (reading HIGH). Alternatively, use sensors that give active feedback like I2C/Onewire etc.
For specific cases you could try to wire the ADC-port to the applicable GPIO pin and then measure its voltage(changes) and make assumptions accordingly.