Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. # Attract mode Scriptlet to fire coil
  2.  
  3. from mpf.system.scriptlet import Scriptlet
  4.  
  5. class PulseCoil(Scriptlet):
  6.  
  7. def on_load(self):
  8.  
  9. self.machine.events.add_handler('machineflow_Attract_start', self.start)
  10.  
  11. def start(self):
  12.  
  13. self.machine.switch_controller.add_switch_handler('your_switch_name',
  14. self.fire_coil)
  15.  
  16. def fire_coil(self):
  17. self.machine.coils['your_coil_name'].pulse()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement