Getting SPI temperature data from outside of class
问题 I'm trying to write a class "Temperature" that handles communicating with my RaspberryPi through SPI to read some temperature data. The goal is to be able to call a GetTemp() method from outside of my Temperature class so that I can use temperature data whenever I need it in the rest of my program. My code is set up like this: public sealed class StartupTask : IBackgroundTask { private BackgroundTaskDeferral deferral; public void Run(IBackgroundTaskInstance taskInstance) { deferral =