commy wrote:It compiles fine but crashes/hangs when the encode method is called.
commy wrote:The optimized qrencoder only uses 640 bytes of SRAM.
commy wrote:But it could be nice to rewrite the SSD1306 library to not use a large display buffer and get the SRAM usage under 2KB.
driverblock wrote:Arduino libraries are not pre-compiled. You provide them as source code; there is no need for you to compile them before-hand.
Have a look at our libraries tutorial here: http://www.ladyada.net/library/arduino/libraries.html
commy wrote:I did not rewrite the code to a Arduino library because of the way qrduino is build.
But it is quite easy to use when you got an idea of how it works. The code comes with both a project and an some tools, one for generating the frame.h file to optimise the SRAM usage.
First build the tool using the Makefile and then run the ./dofbit with the version and level needed (be carefull of memory use when using higher version and ecc levels).
Next copy the files frame.h, qrencode.h and qrencode.cpp to your Arduino sketch.
Include the frame.h and qrencode.h and copy the string you want to encode to the "strinbuf" object and call qrencode();
strcpy((char *)strinbuf, "http://adafruit.com");
And you can now run through QRBIT(x,y) to get the pixel (use WD to find max width and height of x and y).
Hope this helps!