Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # dwell on corners Sammel Lothar
- # license "GPLv2 or greater"
- import hal
- import time
- #Now we create the HAL component and its pins
- c = hal.component("dwelloncorners")
- c.newpin("time_to_dwell",hal.HAL_FLOAT, hal.HAL_IN)
- c.newpin("deg",hal.HAL_FLOAT, hal.HAL_IN)
- c.newpin("mot",hal.HAL_FLOAT, hal.HAL_IN)
- c.newpin("in", hal.HAL_FLOAT, hal.HAL_IN)
- c.newpin("out", hal.HAL_FLOAT, hal.HAL_OUT)
- c.ready()
- try:
- while 1:
- time.sleep(1)
- h["out"] = h["in"]
- except KeyboardInterrupt:
- raise SystemExit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement