I've looked for an answer to this but failed to find the answer, so hoping someone can give me some help.
I have an Arduino UNO, most of the analogue inputs are used for analogue reading.
I wish to send all these analogue readings via WiFi to an RPi MQTT server (Broker).
I have a D1 Mini to do the WiFi part (with a level shifter).
Using these components what is the best way of sending my analogue readings to the RPi? The UNO is using Software Serial to send messages to the D1 Mini.
Does the #include <PubSubClient.h> run on the UNO or D1 Mini?
Why two processors and two sketches.
Could be more logical, depending on the sensors, to connect an A/D to the D1 mini, like the ADS1115.
No Uno.
Leo..
Wawa:
Different sensors need different types of A/Ds.
The ADS1115 or the MCP3008 might not be suitable for your unspecified sensors.
Leo..
One analogue input is from a Voltagesensor ZMPT101B , another is from DFROBOT SEN0098 , and another is from a pressure sensor which measures water content in a tank. The remaining inputs measure temperature etc.
The ADS1115 looks an interesting device, the MCP3005 I am familiar with. I will consider the best device since you have raised the point.
The ACS758 definitely needs a 5volt ratiometric A/D, so maybe not an ADS1115 for that one.
The MCP3008 seems suitable if you power it with 5volt.
In that case level shifting must be done when interfacing it with a 3.3volt processor.
If... the pressure sensor has a 10%-90% output (wrongly sold as 0.5-4.5volt), then the same as above.
Don't know about the ZMPT101B, but it could be better with an absolute A/D (like the ADS1115).
Temp sensors could be analogue or digital. Digital is usually less problematic and more stable.
Leo..