reading multiple analog sensors
Posted: 25 Aug 2018, 11:07
Hi !
i have two sensors. A moisture and a photoresistor. I'd like to use both together with a wemos d1 mini, which only has one analog input.
I already wired the vcc to several gpio's and defined a switch to power on/off the sensors. Both Analog output goes to A0 on the wemos.
Now i can switch between the senors, so that only one sensor has power.
Unfortunately the measurements for both senors are not correct. When i connect only one sensor to A0, everything works fine and the measurements are correct.
What do i wrong! Is there any trick?
Thanks a lot!
Regards.
C
i have two sensors. A moisture and a photoresistor. I'd like to use both together with a wemos d1 mini, which only has one analog input.
I already wired the vcc to several gpio's and defined a switch to power on/off the sensors. Both Analog output goes to A0 on the wemos.
Now i can switch between the senors, so that only one sensor has power.
Unfortunately the measurements for both senors are not correct. When i connect only one sensor to A0, everything works fine and the measurements are correct.
What do i wrong! Is there any trick?
Thanks a lot!
Regards.
C