Beginner in need of help !!


Results 1 to 40 of 72

Threaded View

  1. #2
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    Not sure how much help you need. I'm assuming you know input/ output, high/ low...

    Google "Pull down switch" and see how the level goes from high to low when the button is pressed (there is a pull up as well); use standard input technique to read the level change when the switch is pressed. To control the LED output, I think an if/ then will work well:

    If Button press = 0 and LED = off then [turn on LED]
    If Button press = 0 and LED = on then [turn off LED]

    You should also look at "debounce" as there is some issue to mechanical switches.

    Also, without some programming to limit the speed, the switch will turn the LED on/ off very quickly. A pause will work (to give the user time to release the button) or, you can look for a "1" on the switch (released) before allowing another button press to register.

    HTH,
    Last edited by Amoque; - 15th January 2015 at 13:35.

Similar Threads

  1. Beginner help!
    By Recognize in forum General
    Replies: 14
    Last Post: - 26th April 2012, 14:55
  2. pic24 beginner
    By robertpeach in forum General
    Replies: 23
    Last Post: - 13th August 2009, 11:57
  3. need help! to beginner
    By emilhs in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 6th May 2009, 18:44
  4. Beginner at PB
    By alphahr in forum Off Topic
    Replies: 1
    Last Post: - 21st April 2008, 17:43
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 5th May 2005, 23:29

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