Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for AI/DI/Customized module #556

Merged
merged 16 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions kas-iot2050-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,3 @@ local_conf_header:
USERS += "root"
USER_root[password] ??= "root"
USER_root[flags] ??= "clear-text-password force-passwd-change"

iot2050_user: |
GROUPS += "gpio pinctrl i2c spi pwm iio dialout"

USERS += "iot2050"
USER_iot2050[password] ??= "iot2050"
USER_iot2050[flags] ??= "clear-text-password force-passwd-change create-home"
USER_iot2050[groups] ??= "gpio pinctrl i2c spi pwm iio dialout"
USER_iot2050[shell] ??= "/bin/bash"
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ def setPinmux(index, mode):
uart = mraa.Uart(0)
uart.setFlowcontrol(False, True)

def preAllocatePwm():
""" Allocate PWM pins upfront for creating PWM sysfs entries and adjusting permissions accordingly.
This is required for non-root access to PWM pins.
"""
for i in [4, 5, 6, 7, 8, 9]:
p = mraa.Pwm(i, owner=False)
p.close()

def initAruinoPins():
for i in range(0, 20):
Expand Down Expand Up @@ -81,7 +74,6 @@ def getBoardModel():
def main():
initExternalSerialMode()
if "IOT2050 Advanced SM" != getBoardModel():
preAllocatePwm()
initAruinoPins()


Expand Down
Loading