mr_smartepants wrote:

Some hardware vendors have an SDK (software development kit) that contains the tools and documentation to make the correct software hooks and calls to interface with the hardware.  But most are closed to driver development as these are closely guarded secrets. 
If you're building your own hardware, then you are the best one to know how it works and what to do with it.
I'm guessing this is for a school project, so by answering your questions, we would be cheating you from a valuable learning experience. wink

really?
I will try with this code. Hope it will run.