daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Jan 12th, 2013 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python
  2.  
  3. #  dwell on corners Sammel Lothar
  4. #  license "GPLv2 or greater"
  5.  
  6. import hal
  7. import time
  8.  
  9. #Now we create the HAL component and its pins
  10. c = hal.component("dwelloncorners")
  11.  
  12. c.newpin("time_to_dwell",hal.HAL_FLOAT, hal.HAL_IN)
  13. c.newpin("deg",hal.HAL_FLOAT, hal.HAL_IN)
  14. c.newpin("mot",hal.HAL_FLOAT, hal.HAL_IN)
  15.  
  16. c.newpin("in", hal.HAL_FLOAT, hal.HAL_IN)
  17. c.newpin("out", hal.HAL_FLOAT, hal.HAL_OUT)
  18.  
  19. c.ready()
  20.  
  21. try:
  22.     while 1:
  23.         time.sleep(1)
  24.         h["out"] = h["in"]
  25. except KeyboardInterrupt:
  26.     raise SystemExit
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top