First a small intro: I am building a barcode scanner and have finished on the hardware part but now I am stuck on the software part. I have attached a laser scan engine and feeding its output to a digital pin (A2) that I have set as input. So far so good and my pin reads as such val = digitalRead(A2); // read PIN A2 and gives me a stream of raw binary data. What I wanna do now is take this binary data and use a decoding library (ZBar / ZXing are the most popular ones) to translate it to an actual string.
ZBar is already written in C++ so that's good. I believe the most important files for me are decode.c/decode.h/scanner.c/code128.c/code128.h/zbar.h. So where do I go from here? The problem is that if I try for example to create a sketch with decode.c I am having many problems with header files dependencies. If I use the import library function and then include them, they still include their own header files, which cannot be found and I get a fatal error.
I know it's not a very straightforward question, but does anyone here have experience of importing programs to Arduino? Can anyone help?