Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 29th, 2008, 12:19 AM   #1
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,198
Rep Power: 5 lectricpharaoh will become famous soon enough
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.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old Mar 29th, 2008, 7:42 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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. ;-)
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 29th, 2008, 8:12 AM   #3
Grich
Professional Programmer
 
Grich's Avatar
 
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 330
Rep Power: 2 Grich is on a distinguished road
Re: Playing with my Knob ;)

Cool, another knob for my computer!
__________________
SYNTAX ERROR ...
Grich is offline   Reply With Quote
Old Mar 29th, 2008, 4:18 PM   #4
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,198
Rep Power: 5 lectricpharaoh will become famous soon enough
Re: Playing with my Knob ;)

Quote:
Originally Posted by Ooble
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.
Heh. Yet the obvious solution of not making the truckers drive for so many hours eludes them, huh? Well, as my dad always says, common sense isn't.
Quote:
Originally Posted by Ooble
With that in mind, the pulsing thing would be annoying when I'm trying to sleep. ;-)
Actually, you can set it to pulse or not pulse, as well as adjust the pulse rate. If it's not set to pulse, the light level reflects the current volume. However, this is a gadget that seems aimed more at Mac users than anyone else, and apparently, the device (at least the LED) is controllable through AppleScript or whatever it's called. Since I'm not a Mac user, I'll probably STFW to see if there are any similar resources for us Wintel people.

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.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old Mar 29th, 2008, 11:20 PM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Re: Playing with my Knob ;)

It definitely sounds pretty sweet. I want one.

No idea why. I just do. :-)
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 30th, 2008, 2:48 AM   #6
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,667
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
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.
big_k105 is offline   Reply With Quote
Old Mar 30th, 2008, 2:56 AM   #7
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Re: Playing with my Knob ;)

'Tis a good point K. I shall get one... right after my student loan comes in. ^_^
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 13th, 2008, 10:11 AM   #8
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,198
Rep Power: 5 lectricpharaoh will become famous soon enough
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#.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I started playing with some drawing commands metron9 C# 2 Oct 14th, 2007 12:13 AM
Playing Sound Client-Side King ASP.NET 3 Jul 6th, 2007 12:47 PM
Playing with PDBs in Windows magnus.therning C++ 0 Jan 10th, 2007 9:50 AM
Just playing Pimp Daddy Sed and Awk 3 Sep 5th, 2006 7:58 AM
Playing sounds in python? j3ff86 Python 12 Mar 30th, 2006 1:41 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:18 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC