title: ATTINY 85 SLEEP MODE
body: <p>I am new to programming microcontrollers and I've just started using Attiny85. I am trying to build a circuit for LED with tactile switch. Every time the tactile switch is pressed it jumps the LED to next state of operation. Since it is battery operated, when the LED is OFF I want the attiny 85 to consume as low current as possible. As of now it is consuming 4mA when the LED is OFF without sleep mode. So I tried the power down mode for Attiny 85 but some how i am stuck in the power down mode</p>
  
  <pre><code>if(count == 8){
            analogWrite(0,LOW);
            //Serial.println("I am OFF");
            //Serial.println(count);
            set_sleep_mode(SLEEP_MODE_PWR_DOWN); //Power down everything
            sleep_mode();
            sleep_disable();
          }
  </code></pre>
  
  <p>It is successfully entering the sleep mode but i am not able to get out of it. Can please someone help. I want the Attiny 85 to get out of the sleep mode when the tactile switch is pressed again. The switch is on pin 7 i.e. PB2 of attiny 85. </p>