Author Topic: Wake up computer with Digikeyboard?  (Read 3135 times)

BigBlarg

  • Newbie
  • *
  • Posts: 2
Wake up computer with Digikeyboard?
« on: March 15, 2017, 07:34:20 pm »
Hi,

I just did my first project with a Digispark (also my first experience at all with that kind of product).

I used the following guide (with a lot of tweaking in the IR decoding part to make it work with my remote) to build a IR Receiver for my HTPC running Windows 7 : http://ediy.com.my/index.php/blog/item/74-digispark-infrared-receiver

The thing works fine while Windows is running.

However when Windows goes to sleep, even if the Digispark seems to be still powered, pressing any key on my remote (which should simulate a keyboard key stroke) won't wake up the computer. A regular USB keyboard will wake the computer if I press any key.

To troubleshoot the issue I added a LED to PIN 0 and reprogrammed one of the remote buttons to toggle the LED on or off. That part works perfectly while Windows is running but as soon as the computer goes to sleep, even if the LED stays on, the remote button won't toggle it off. If I wake up the computer by any other mean, everything start working again.

I don't think the problem is the code. The Digispark just seem to stop reacting if Windows is not running.

I'm not quite sure why and my experience with building my own electronic devices is limited to that project. Any suggestion?

Thank you

Edit : I didn't mention it but the test with the LED on pin 0 was for a workaround. I thought about sending a signal that would simulate pushing the power switch on the computer to wake it up. However since the Digispark won't respond to the IR signals at all while the computer is sleeping it seems that it is not an option. I also came accross this post : https://digistump.com/board/index.php/topic,1888.msg8491.html#msg8491 because i had the same problem (the Digispark won't work from a cold boot). Would the problem be similar? Would a Digispark Pro or adding a crystal fix my problem?
« Last Edit: March 16, 2017, 06:41:17 am by BigBlarg »

light137

  • Newbie
  • *
  • Posts: 12
Re: Wake up computer with Digikeyboard?
« Reply #1 on: March 17, 2017, 08:42:14 pm »
I think maybe your program is stuck  in the code DigiKeyboard command, update, println or sendKeyStroke, when you system goes into sleep. So you checking LED will not toggle itself. I think the problem is still at the usb communication.
« Last Edit: March 17, 2017, 09:16:14 pm by light137 »