April 2020
Intermediate to advanced
294 pages
7h 53m
English
The IotDevice class will contain the specific behavior for our sensor node. This class will contain the methods necessary to sample our sensors, control external devices, and so on. For our example, the IotDevice class will perform several functions, including the following:
The first step is to create the IotDevice class and build the constructor. An example of what this might look like can be seen in the following code:
class IotDevice: def __init__(self): self.LED1 = "Off" self.LED2 = "Off" self.LED3 ...
Read now
Unlock full access