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.... 

sort by: active | newest | oldest
lemonie7 years ago
Drop the PICAXE if all you want is off/on.

Minifig6667 years ago
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.
seandogue7 years ago
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
kelseymh7 years ago
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.