906Views5Replies
how can i on off a led with one push button,?
i'm having trouble with picaxe program editor to do it..... i didn't got code for this thing....
i'm having trouble with picaxe program editor to do it..... i didn't got code for this thing....
Drop the PICAXE if all you want is off/on.
L
Select as Best AnswerUndo Best Answer
this
Select as Best AnswerUndo Best Answer
main:
if pin1=1 then high 2 else low 2 endif
goto main
That will work with the 08 and most others, you will have to change the pins to suit your PICAXE.
I have two comments to make been a resident of the PICAXE forum where you will get better results.
Tell us exactly what your project is and what you want to do.
Take time with your question: Hello, I need a bit of help with my project. My aim is... is better than: how can i on off a led with one push button,? Which is a nonsensical sentence.
Select as Best AnswerUndo Best Answer
Unless you use a j-k flip flop as an input buffer, you'd have to use an interrupt to get the kind of response that would need.
I'm with lemonie & Kelsey on this. Just use a clickety switch. and be done with it.
If you're set on using the picaxe, download the dev manuals
Select as Best AnswerUndo Best Answer
If you're using a microcontroller, then your application must be relatively complex. You do not provide anywhere near enough information for someone to answer your question under those circumstances.
A trivial SPST latching push-button switch, wired in series with an LED and a battery, will do exactly what you have described in your question.
Select as Best AnswerUndo Best Answer