MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / init_dht_sensor

Method init_dht_sensor

Software/Python/easygopigo3.py:1147–1164  ·  view source on GitHub ↗

Initialises a :py:class:`~easysensors.DHTSensor` object and then returns it. :param int sensor_type = 0: Choose ``sensor_type = 0`` when you have the blue-coloured DHT sensor or ``sensor_type = 1`` when it's white. :returns: An instance of the :py:class:`~easysensors.DHTSen

(self, sensor_type = 0)

Source from the content-addressed store, hash-verified

1145
1146
1147 def init_dht_sensor(self, sensor_type = 0):
1148 """
1149 Initialises a :py:class:`~easysensors.DHTSensor` object and then returns it.
1150
1151 :param int sensor_type = 0: Choose ``sensor_type = 0`` when you have the blue-coloured DHT sensor or ``sensor_type = 1`` when it's white.
1152 :returns: An instance of the :py:class:`~easysensors.DHTSensor` class and with the port set to ``port``'s value.
1153
1154 The ``use_mutex`` parameter of the :py:meth:`~easygopigo3.EasyGoPiGo3.__init__` constructor is passed down to the constructor of :py:class:`~easysensors.DHTSensor` class.
1155
1156 .. important::
1157
1158 The only port to which this device can be connected is the ``"SERIAL"`` port, so therefore, there's no need
1159 for a parameter which specifies the port of device because we've only got one available.
1160
1161 The ``"SERIAL"`` port is mapped to the following :ref:`hardware-ports-section`.
1162
1163 """
1164 return easysensors.DHTSensor(self, sensor_type, self.use_mutex)
1165
1166 def init_remote(self, port="AD1"):
1167 """

Callers 1

DHTSensorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected