toggle switches and buttons-- need little help


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: toggle switches and buttons-- need little help

    I see only a comment for your switch code, and the code for what seems like 4 buttons (Plow up/down, Dump up/down).

    Robert

  2. #2
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: toggle switches and buttons-- need little help

    If you want your code to just check the position of the switches, set the corresponding LED's and then move on to something else (like checking if a button is pressed then something like this should work. You will just need to take into account how often the program will make it to this part of the code to check switch postion.


    Code:
    If switch1 = 1 then switch1LED=1 else switch1LED=0
    If switch2 = 1 then switch2LED=1 else switch2LED=0
    
    'now continue on  to the rest of the program...
    hope this helps...
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

Similar Threads

  1. 12F683 + buttons
    By sincity337 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th October 2010, 19:53
  2. Buttons
    By WarPony in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 16th May 2008, 01:47
  3. 6 Buttons
    By Johansch in forum General
    Replies: 3
    Last Post: - 4th July 2007, 15:21
  4. toggle command w/ multiple switches
    By earltyso in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 15th February 2007, 17:47
  5. Latched buttons
    By peu in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 25th January 2006, 00:22

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