I’m working on a project that has a thermistor in it. The thermistor data is used by a controller to turn heaters and coolers on and off and is used by a display that outputs it’s information to the user. The thermistor object has all the usual get(), set(), read() methods.
What I want is to have my controller object and my display object access the thermistor object without passing the data up to the main loop and then back down. So graphically I want this:
Main Loop / \ Contoller Display \ / Thermistor
Instead of this:
______Main Loop______ / | \ Thermistor Controller Display
How do I set this up with classes and objects? Or is there a better way to do this? I haven’t been able to find the right search terms I always end up reading the same things about inheritance which isn’t what I want to do here.