View Single Post
  #5   Spotlight this post!  
Unread 03-02-2006, 18:12
Calvin Calvin is offline
Registered User
no team
 
Join Date: Feb 2005
Location: Portland OR
Posts: 105
Calvin has a spectacular aura aboutCalvin has a spectacular aura about
Re: Beginning programmer: Variable question HELP!!!

wow thanks for the quick reply,
I figured out a way to do it with two buttons. Now it works fine.

I completely forgot about the quick loop, and started questioning my programming skills.

PHP Code:
/////**** Start of RELAY 7 code ****/////
    
if(bob7 == 0)
    {
       
printf("Bob7 = 0\r");
       
relay7_fwd 1;
    }
    if(
bob7 == 1)
    {
       
printf("Bob7 = 1\r");
       
relay7_fwd 0;
    }
    if(
bob7 == 2){printf("Bob7 = 2\r");}
    
    if(
bob7 == && p1_sw_trig){bob7 0;}
    if(
bob7 == && p1_sw_top){bob7 1;}
    if(
bob7 == && p1_sw_trig){bob7 0;}
/////**** End of RELAY 7 code ****///// 

Last edited by Calvin : 03-02-2006 at 22:29.