Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: BASIC programming problem HELP!

  1. Sep 1, 2011 #1
    Im trying to write a program that flashes and LED at a rate that a button is pressed. Cycle to 1 of 5 preset speeds each time the button is pressed... cannot figure out how to do it please help :/
     
  2. jcsd
  3. Sep 1, 2011 #2

    phinds

    User Avatar
    Gold Member

    You need to read the forum rules. You have to tell us why effort you made so far, otherwise it just looks like you are asking someone to do it for you.
     
  4. Sep 1, 2011 #3
    I have tried PWM and it doesnt work for me i have also tried using variable counters ... PWM doesnt seem to work if the button is pressed more than once
     
  5. Sep 1, 2011 #4

    phinds

    User Avatar
    Gold Member

    buttons and leds are not software. How is this hardware hooked to the computer? What I/O signals do you have a available from the computer? How are those commanded by the software? You have not even BEGUN to show what you have done so far or the context in which you are trying to do it.

    Something that at least AMOUNTS to PWM should work, but without a LOT more information, I don't see how anyone is going to help you.
     
  6. Sep 1, 2011 #5
    At least post a pseudocode
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook