Casper Posted December 15, 2010 Share Posted December 15, 2010 I was trying to think of a way to detect when windows finished installing drivers for the keyboard HID and this is what I came up with, it uses the phukdlib lib but could be pulled out and used. The basic idea is to wait until the number lock key is on. On a lot of systems this is left on all the time. Once the drivers are installed windows sends the status of this to your keyboard. Here's the code i'm using in my setup for it. setup() { while(!IsNumbOn()) { digitalWrite(ledpin, HIGH); delay(500); digitalWrite(ledpin, LOW); delay(500); } } I actually have that in an if block that looks for a dip switch to be set, if on uses this method, if not fall back to a delay. Other ideas could be to actually send the command to press the numlock key and then check if it's on, if not repeat. Some issues with this though is, like on my laptop, my keyboard doesn't have a numlock, and so it is off by default. Should work on most systems though. Have not tested on linux yet to see if it works the same or not. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.