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

Method motion_detected

Software/Python/easysensors.py:1288–1296  ·  view source on GitHub ↗

Checks if the `Grove Motion Sensor`_ detects a motion. :returns: ``True`` or ``False``, if the `Grove Motion Sensor`_ detects a motion or not. :rtype: bool

(self,port="AD1")

Source from the content-addressed store, hash-verified

1286 raise
1287
1288 def motion_detected(self,port="AD1"):
1289 """
1290 Checks if the `Grove Motion Sensor`_ detects a motion.
1291
1292 :returns: ``True`` or ``False``, if the `Grove Motion Sensor`_ detects a motion or not.
1293 :rtype: bool
1294
1295 """
1296 return self.read() == 1
1297##########################
1298
1299

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected