November 21, 2024, 09:17:25 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


Multiple voltages off the Prop-1

Started by zeenon, May 25, 2007, 12:13:55 PM

Previous topic - Next topic

zeenon

Jon,

Just curious which program you would use (they both should do the same thing)?

I think the second one is so much easier to program, but I just wanted to see if there are any gotchas, that would make me use the first one.

Main:
  IF TRIGGER = IsOff THEN Main                  ' wait for pressure switch

  LedSpot3 = IsOff
  valve = IsOn                                           ' open valve
  PAUSE 2000

  LedSpot1 = IsOn
  PAUSE 2000

  LedSpot1 = IsOff
  LedSpot2 = IsOn
  PAUSE 2000

  valve = IsOff                                 ' close valve
  PAUSE 500

  LedSpot2 = IsOff
  LedSpot3 = IsOn
GOTO Main


Program#2:

Main:
  IF TRIGGER = IsOff THEN Main                  ' wait for pressure switch
  PINS = %10000000
  PAUSE 2000
  PINS = %10000001
  PAUSE 2000
  PINS = %10000010
  PAUSE 2000
  PINS = %00000010
  PAUSE 500
  PINS = %00000100                              ' Arming LED when lit, ready to fire
  GOTO Main





dacostasr

I'm glad I surfed to this message...I didn't know the sprinkler valves could run off 12V!!! I just tested my prop1 with a cannibalized program and it worked great...head popped up, paused 5 seconds and back down. WOOHOO!

Know to incorporate my other valve for the spitter...

Doing a piece at a time so I can learn the programming ???

Thanks
Dennis

JonnyMac

Z,

I would probably use program #2 for myself, but write program #1 for others.  I've been programming for over 25 years now so I have no trouble "seeing" in binary ( like Neo in the Matrix...  :D ).  If you check you'll see that program #2 uses a little less memory because you're doing simultaneous turn-off/turn-on events versus individual items that are handle serially.
Jon McPhalen
EFX-TEK Hollywood Office