Skip to main content
4 of 7
added 54 characters in body
Milliways
  • 61.5k
  • 32
  • 108
  • 212

Toggle on/off with a push button (WiiMote)

I want to make a on/off signal with only a push button, exually its for my WiiMote but I dont think that that makes a difference. I want a led to turn it on ans off.

I was thinking about a counter in Python, state 1 is signal ON and state 2 is reset to 0(0 would be OFF). I have seen other posts about this and tried them, but none off them works:(

This is what I tried. I dont know the exact code but it begins with this.

State = 0

If (input) =1:
    If State == 1: 
        State = 0 
    Elif state == 0: 
        State = 1

I tried also with 2 transistors but that didnt work either. Any other hardware Solutions?

I hope one off you would like to help me building my robot!!

Below I paste a photo off my robot, for in case you where wondering how it looks like;)

Thanks!