Author Topic: attiny85 sleep mode and wake-up via button  (Read 3903 times)

Jr_sc

  • Newbie
  • *
  • Posts: 4
attiny85 sleep mode and wake-up via button
« on: February 16, 2016, 02:12:53 pm »
Hello.  I have a project and like to put the dissipate to sleep and wake up via button on pin2 .  I have tried numerous examples incl those in this forum and no idea if it works because nothing happens.  I have a strip of WS2812 LEDs and after time want to sleep.  When examples called nothing happens, power and WS LEDs stay lit.  If I turn off LEDs in sleep() they shut off so subroutine is being called.

I tried the slower clock speeds in the Arduino IDE (8MHZ no USB) but digit no longer recognized by Windows.

any thoughts appreciated!

DeuxVis

  • Full Member
  • ***
  • Posts: 107
Re: attiny85 sleep mode and wake-up via button
« Reply #1 on: February 17, 2016, 08:19:39 am »
I am not sure to understand what you want to do ?

Do you want to turn off the leds lights after some time ?
To turn them off you have to set their colours to all zeros.
Being "smart" leds they will continue to dispaly the last color you sent them as long as they are given some current.

Jr_sc

  • Newbie
  • *
  • Posts: 4
Re: attiny85 sleep mode and wake-up via button
« Reply #2 on: February 17, 2016, 03:04:04 pm »
Thanks for replying & sorry not clear.

Basically I want to put the device to sleep.  My 'assumption' was when it's asleep it'd also shut off the WS2812 & power LEDs - guess not.

I do shut the LEDs off in sleep() but can not tell if sleep code is working - the device seems to function 'normally' - when I push a button behaves exactly like no sleep code.

Do I have to get a VOM and measure the current or is there another way to know?

Secondly - I tried to write to the Digi using the 'slower' (8mhz No USB) board and seemed to have bricked the Digi in that Windows USB does not recognize it - was trying to figure what these 'No USB' options are for.
« Last Edit: February 17, 2016, 03:13:29 pm by Jr_sc »