As I want to use this for several projects, I'm working to break down the one big loop into subroutines. ( aka functions )
The sensor reading could be done inline but then it's not quite as universal as it will be once I abstract out the hardware specific stuff. Because then, I can call ReadTemp(t,h) in my loop and just put the ReadTemp() module for the particular hardware I'm using into the code.
I'll still have to make sure the relevant library is compiled and the right input pins etc, are initialised but changing a sensor to a different type will be as easy as just including the appropriate version of ReadTemp().
This makes sense because I'd like this to be applicable to as many different sensors as possible, in combination with as many others, as possible. In particular, I want this to work with ModulUno as part of a network of sensors around my homestead that automates absolutely everything for me, so some FEPs (Front End Processors) may well do a dozen different (but overlapping between different FEPs) things, and then it's easier to have just one place in the repository to find all the code snippets.