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.
3 comments
My name is Mark from Smartpen here in Australia. We distribute the Livescribe pens. We've had a couple of our customers also start tinkering with the Livescribe development platform.
I was wondering whether you could share any additional thoughts/findings on the dev platform as I want to share this with our Australian customers via our blog.
cheers
I've also been using a custom docking client like yours, but it's not working anymore since LD v1.6.
when InitializeDeviceListening() is called I get a PenUndocked event (even if the pen was docked), and afterwards I do not get any more events (nither PenDocked or PenUndocked). So my docking client isn't working anymore.
Can you test if you're experiencing similar issues ?
If your client is working properly, can you please post/send me your code so that I can compare?
Thanks in advance,
Michel
This post has 2 feedbacks awaiting moderation...
12/01/08 04:03:47 pm, 