I need a Windows command line program that will read the temperature from a Dallas/Maxim DS18B20 sensor connected to the Windows PC via a OneWire and a DS9490R USB-to-OneWire interface, and return the temperature in stdout. I will provide the address of the sensor as a command line argument. It just needs to do this once when I run it (it will be called from a higher level program that organises the sampling interval, logs the results to a database etc.). Ideally it will run in Windows 8.1 X64, to avoid having to set up a VM with a different version of Windows (more complication I don't need). Does anyone know of something like this? I have tried to write this in C, using Maxim's OneWire Public Domain API, but I'm getting all sorts of problems. I know the hardware is working because OneWireViewer will find the sensor and return the temperatures fine. Ideally the program I'm looking for will have source code available, so that I can extend it to read atmospheric pressure (from a BMP280) and humidity (from a Sensirion SHT31-DIS-F),
If this doesn't currently exist, can you please suggest the easiest way of writing it? Is there some source code
If this doesn't currently exist, can you please suggest the easiest way of writing it? Is there some source code