rotary encoder library QEI

20 Jul 2010

Hi,

Wrote this simple prog to interface an endless rotary encoder to mbed. Problem is I have no idea how to turn this in to a library. Anybody help or advice would be greatly appreciated.

Cheers,

James

EncoderRead

14 Feb 2011

You'd need to convert the code to a C++ object (that is, no main.cpp) with header file and code then publish the object as a library, I think?

I'm in the middle of doing this myself with some code. You can take the program you've written and create a library folder within. Then create your header and .cpp object file in there.

Best bet is to follow other examples of libraries/objects.

Btw, thanks for this code example; I needed a simple single-track encoder routine for a robotics project to get distance and speed info.

Michael