Skip to content

Commit 61bb5f3

Browse files
Fixing motion sensor to return a float
1 parent 2f396eb commit 61bb5f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

electroblocks/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def config_motion_sensor(self, echoPin, trigPin):
244244

245245
def motion_distance_cm(self):
246246
pin = self.pins[ComponentPins.ULTRASONIC_SENSOR][0]
247-
return self._find_sensor_str(pin, "ul")
247+
return float(self._find_sensor_str(pin, "ul"))
248248

249249
# Button Methods
250250
def config_button(self, pin):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "electroblocks"
7-
version = "0.1.21"
7+
version = "0.1.22"
88
description = "Python client library to interact with ElectroBlocks Arduino firmware"
99
authors = [
1010
{ name = "Noah Glaser", email = "[email protected]" }

0 commit comments

Comments
 (0)