simple newb question


Results 1 to 14 of 14

Threaded View

  1. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    ORRRRRRR

    Code:
    TRISB = 1   
    
    ServoInput VAR PORTB.0
    rled VAR PORTB.1 ' BIND OUTPUT TO RB1
    lled VAR PORTB.2
    
    PORTB=0 ' turn leds off
    
    Start:
    
    if ServoInput then ' same as If ServoInput=1 then
              rled = 1 ' right side led on
              pause 250 ' pause 1/4 second 
              rled = 0 ' right side led off
              pause 250 'pause off
    Else
              lled = 1 'left side led on 
              pause 250 'pause 1/4 sec
              lled = 0 ' left led off
              pause 250 'pauses off for 1/4 sec 
    endif
    goto start
    Last edited by mister_e; - 4th February 2005 at 20:28.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Newb Question...
    By Perrin` in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd January 2009, 20:49
  2. Really simple question for you experts :)
    By lew247 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th June 2008, 01:43
  3. SIMPLE question
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th February 2008, 18:27
  4. really simple, dumb question
    By picster in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd March 2007, 22:02
  5. really simple adcin question
    By kitcat in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 21st April 2006, 09:06

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts