make LED go ON and OFF using Microcontroller

Home Forums Arduino Tutorial Discussions make LED go ON and OFF using Microcontroller

Tagged: , ,

Viewing 1 reply thread
  • Author
    Posts
    • #2563
      keshena
      Participant

      Hi, I need help.
      I’m trying to make an LED go on and off using a micro controller, but using a bush button.
      If i press it once it turns the LED on and it remains on, if I press it again it turns the LED off.
      Please help me make that code.

    • #2567
      Bitahwa Bindu
      Keymaster

      HI. You can use the compliment operator ‘~’ to invert the current status. If button is pressed, it compliments the output.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
Select your currency
EUR Euro
USD United States (US) dollar