![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 887
Rep Power: 4
![]() |
Playing with my Knob ;)
I got a Griffin PowerMate the other day, and I must say, it's pretty cool. Has anyone else ever played with one of these? I mean, it's such a simple little gadget, but it's still quite fun to play with. The pulsing blue light is really slick, and makes it easy to find in the dark. Right now, I've got it set up as a volume control as well as a remote for Winamp with play/pause, stop, next track, and previous track. It works great for controlling the music while gaming, since media keys are so last year.
![]()
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8
![]() |
Re: Playing with my Knob ;)
Does seem pretty cool. I was reading a little while ago that they were thinking of installing blue lights in trucks to trick drivers into thinking it's morning and stop them from falling asleep at the wheel. With that in mind, the pulsing thing would be annoying when I'm trying to sleep. ;-)
|
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 148
Rep Power: 1
![]() |
Re: Playing with my Knob ;)
Cool, another knob for my computer!
__________________
SYNTAX ERROR ... |
|
|
|
|
|
#4 | ||
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 887
Rep Power: 4
![]() |
Re: Playing with my Knob ;)
Quote:
Quote:
Failing that, it seems like a good opportunity to learn low-level USB programming. I mean, it's not going to get much simpler than a device like this, so it seems a good place to start.
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
||
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8
![]() |
Re: Playing with my Knob ;)
It definitely sounds pretty sweet. I want one.
No idea why. I just do. :-) |
|
|
|
|
|
#6 |
|
PFO Founder
![]() ![]() |
Re: Playing with my Knob ;)
@Ooble: You never need a reason to want a new gadget
![]()
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#7 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8
![]() |
Re: Playing with my Knob ;)
'Tis a good point K. I shall get one... right after my student loan comes in. ^_^
|
|
|
|
|
|
#8 |
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 887
Rep Power: 4
![]() |
Re: Playing with my Knob ;)
<bump>
So, I've been experimenting with writing a 'driver' for this. Well, it's not so much a driver- for HIDs, those are built into Windows itself, for the most part- but rather a program that receives 'HID reports' from the device, and responds accordingly. The software that came with the PowerMate is this dinky little program that sits in the system tray, and allows you to set responses for six different 'actions' of the device. These are: rotate clockwise/counterclockwise, click (the knob is also a button), long click (ie, held down for a moment rather than quickly pressed and released), and rotate clockwise/counterclockwise while holding the button down. The program also recognizes which is the foreground application, and different applications can have different settings. The responses can be various things, such as adjusting volume, scrolling a window, sending virtual keystrokes to applications, and so on. Now, what I've been thinking is that I can improve on this by adding modifier keys (for example, holding SHIFT while rotating) to increase the number of actions the software would recognize. I could also add entirely new base actions, such as double-clicking, because the device itself (as far as I know) simply sends updates when I was also considering a shortcut that allowed the user to cycle through various settings with the device itself (think 'changing modes'). The LED can also be controlled through software. Basically, it has two modes: pulse, and constant. For pulse, the LED pulses in brightness from completely off to maximum brightness, and one of the parameters is pulse rate. For constant brightness, it is simply set at a level from zero to maximum through software. The pulsing can be set through software, but once set, it remains until something else sets the brightness or pulse rate; it doesn't require the software to send commands (in other words, the device itself handles it, not the USB host). I've considered having the LED flash on certain events. One way to implement this could be to expose a method to other programs, and when this method is called, the LED would flash several times, and then return to the previous setting. This could be useful for various alerts, or as a form of acknowledgment from the software itself (such as when changing modes, where the LED could flash a number of times according to the selected mode). Why am I going on about this? That's simple. I'm wondering if anyone has any suggestions as to what could make a program like this more functional. If you've got an idea that I could use, I'd be happy to hear it. So far, what I have is some HID enumeration code and a bit for registering the device. It currently recognizes which HIDs are connected, and parses out various values from the plug-and-play ID string retrieved from Windows. It can also tell the difference between various instances of the same device, which I've tested with two of the same model of Logitech mouse (since I don't have two PowerMates). Though it doesn't seem like a lot, this constitutes the lion's share of the p/invoke stuff I need to code, so almost all the rest can be good old managed C#. ![]()
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I started playing with some drawing commands | metron9 | C# | 2 | Oct 13th, 2007 11:13 PM |
| Playing Sound Client-Side | King | ASP.NET | 3 | Jul 6th, 2007 11:47 AM |
| Playing with PDBs in Windows | magnus.therning | C++ | 0 | Jan 10th, 2007 8:50 AM |
| Just playing | Pimp Daddy | Sed and Awk | 3 | Sep 5th, 2006 6:58 AM |
| Playing sounds in python? | j3ff86 | Python | 12 | Mar 30th, 2006 12:41 AM |