Setup Raspberry Pi to Collect and Log Data from Arduino

Prepare DS18B20 as the clients

Let say you want to collect the temperature from 4 sensors. In this example, I used fours of DS18B20. DS18B20 is a popular temperature sensor. Other options are the TMP35,36 family or a thermistor.

The wiring is included above. The DS18B20s share the wire (or bus), and here is the Arduino code on GitHub . The attachment in below file contains the codes and wiring map as well.


Also, install the USB driver for Arduino in Windows. Most ‘clone’ Arduino use CH340/CH341 USB driver. The driver is here.

Install driver, when plugging the Arduino to your Windows’ USB, it should recognize the driver and assign a COM port (mine is COM4)

The Serial Monitor should output like the photo below:

The readouts from DS18B20s are quit different, almost 2.5 ℃.