Button problem driving me crazy!! Please help!


Results 1 to 12 of 12

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    untested but i figure i would change the following section...
    Code:
            PowerOn var bit
            
    Initialize:
            Clear ' Clear all memory
            poweron = 1
            High Power_LED ' Power Default = ON
            low Auto_Led ' Auto Defualt = OFF
            High Normal_LED ' Normal Default = ON
            low Pursuit_LED ' Pursuit Default = ON
    
    Start:
            If Power = 1 Then Power_Pressed
            If poweron = 1 then' Execute only if in ON state
                If Normal = 1 Then Normal_Pressed ' Normal button pressed?
                If Pursuit = 1 Then Pursuit_Pressed ' Pursuite button Pressed?
                If Auto = 1 then auto_pressed ' Auto button pressed
                endif
            Goto Start ' Loop forever        '
            '
            '
            '
            '
            '
            '
            '
            '
            '
    Power_Pressed:
            If poweron = 1 Then
                Low Power_LED ' Turn off Power LED
                Low Auto_LED ' Turn off Auto LED
                Low Normal_LED ' Turn off Normal LED
                low Pursuit_LED ' Turn off Pursuit LED
                poweron=0
                pause 1000 ' 1 second debounce delay
                ELSE
                    High Power_LED ' Turn on Power_LED
                    High Normal_LED ' Turn on Normal_LED
                    poweron=1
                    Pause 1000 ' 1 Second Debounce delay
                endif
            Goto Start
    deuh.. looks the same thing you've done... weird... it has to work.
    Last edited by mister_e; - 19th November 2007 at 23:26.
    Steve

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

Similar Threads

  1. PBP is driving me crazy trying to make an 18F chip blink
    By George in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 20th June 2008, 06:08
  2. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  3. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 22:43
  4. push button problem
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd June 2005, 19:44
  5. Button problem.
    By Modena in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th November 2004, 16:43

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