LiveScribe Docking Client
This week I was tasked with figuring out the LiveScribe pen and what can be done to integrate it with some of our existing data entry systems. Over the next few weeks I plan to post information as I find it out. This might be useful to someone else in the future as well as a good reference for me going forward.
If you have a LiveScribe pen, install the LiveScribe desktop (I haven't tested without doing this). Simply create a C# win form application in visual studio. Add the following references:
LS.LDSlim.PluseAccessSDK
LS.LDSlim.PluseAccessSDK.Interop
Both of those can be found in: "C:\Program Files\Livescribe\Livescribe Desktop" (by default).
The PulseAccessSDK.dll needs to be in the bin for this work. What I did was simply add the PulseAccessSDK.dll file which is also found at "C:\Program Files\Livescribe\Livescribe Desktop" and set that to "Copy Always". This will ensure that it copies to the bin at compile time and my app will find it.
Next, add a using statement at the top of your form.
using LS.LDSlim.PulseAccessSDK;
Now we are ready to create the object needed.
Create a member variable:
PenConnection pc;
On the form load, do the following:
pc = PenConnection.CreateInstance();
pc.OnPenDocked += new PenConnection.PenDocked(pc_OnPenDocked);
pc.InitilizeDeviceListening();
Create the following event handler:
void pc_OnPenDocked(LS.LDSlim.PulseAccessSDK.Interop.HardwarePen pen)
{
Console.WriteLine(pen.PenID.ToString());
}
Run the application. When the pen is docked the penId will be printed to the console. There are some other cool properties on there too, just take a look at the HardwarePen object.
Next I plan to see how I can get stroke data off of the pen.
12/01/08 04:03:47 pm,