I'm new to the Raspberry Pi ecosystem so pardon me if I'm talking nonsense.
I want to read the temperature data from the connected DS18B20 sensors using C/C++.
I followed this schema to connect them:
There are a lot of examples how to do it in different languages including C/C++ like:
- rgpio - read any connected DS18B20 temperature sensors
- Using C to monitor temperatures through your DS18B20 thermal sensor
- Read ds18b20 on raspberry pi
- and many others.
But most of them seem to use a legacy way of doing things according to linux kernel docs. Official Raspberry Pi documentation says that Programming with GPIO can be done using standard kernel interface via libgpiod. But I have a hard time to find any useful tutorials about how to do that.
So my question is how to read the DS18B20 temperature sensors in a non-legacy (modern) way ? Can someone point me in the right direction ?