Skip to content

Commit c83064d

Browse files
committed
features/unit/limit:Unit Limit is a travel switch unit
1 parent b7a836a commit c83064d

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

m5stack/libs/unit/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@
3030
from .rs485_iso import ISO485
3131
from .ultrasonic_io import ULTRASONIC_IO
3232
from .ultrasonic_i2c import ULTRASONIC_I2C
33+
from .can import CANUnit
34+
from .limit import LIMITUnit
35+
from .op import OPUnit

m5stack/libs/unit/limit.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from hardware import Button
2+
3+
4+
def LIMITUnit(port):
5+
return Button(port[0])
6+

m5stack/libs/unit/manifest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
"rs485_iso.py",
3535
"ultrasonic_io.py",
3636
"ultrasonic_i2c.py",
37+
"can.py",
38+
"limit.py",
39+
"op.py"
3740
),
3841
base_path="..",
3942
opt=0,

0 commit comments

Comments
 (0)