tz1 / qrduino

qr codes (2d barcodes) for arduino and embedded
GNU General Public License v3.0
70 stars 32 forks source link

How can I use this sketch? #2

Open daparra opened 9 years ago

daparra commented 9 years ago

Hi, I hope to be in the right side, I like to do an QR application for arduino mega with lcd 3,2 touchscreen, I would like insert text from serial input and convert it in QR code, I'm looking for an example or manual but I don't understantd, there are many files and libraries and I'm very confussed, please can you help me with an aplication for guide? Thanks you

tz1 commented 9 years ago

What is your hardware setup? There are multiple Arduinos and displays. The library will return a bitmap from ASCII texts. You can then go through the bitmap and display white or black pixels.

daparra commented 9 years ago

Hi, thanks for your answer. I have an arduino mega 2560 REV3, with ATmega2560-16AU and TFT LCD display 320 X 480 model HX8357B. I have the libraries for communication and driver the display.

tz1 commented 9 years ago

Adjust the makefile for the Avr/Arduino for the size of QR code you want since you have to build some tables using the host.

Look at my "lcd.c" for an example - it isn't a sketch per se, but might works as lcd.ino.

include "qrencode.h"

... strcpy((char *)strinbuf, "Your String Here"); qrencode(); ... //This is the loop that assembles bits and writes them to my LCD t = 0; b = 0; for ( k = 0; k < 84 ; k++) { for ( i = 0; i < 48 ; i++) { b >>= 1; if( i < WD && k < WD ) if( QRBIT(WD-i-1,k) ) b |= 0x80; if( ++t > 7 ) { t = 0; LcdWrite(1, b); b = 0; } } }

itsfever commented 9 years ago

Hi, Thank you for your awesome library. I have Arduino UNO, adafuit 1.44 display and usb barcode scanner module with usb shield. How can I use your Qrduino? Could you give me some example or guide to use? I can find the way to use it on sketch. Thanks for your help.

tz1 commented 9 years ago

Create a folder called lcd, put all the files into that directory, rename lcd.c into lcd.ino and change main() to setup() and add a loop(). You might need to change some of the settings and remove some files (intended for larger systems). But this should get things started.

A fork for a thermal printer (also Adafruit) is at https://github.com/grintor/QRprint

daparra commented 9 years ago

Thanks you Tom, I'm trying, it´s a new concept for me :) Just like tell you

itsfever commented 9 years ago

Thank you for your help! I'll try it!

ghost commented 9 years ago

Hi, I am trying to use this library to generate QR codes. I downloaded the library and unzipped it. Now I'm doing ' gcc dofbit.c ' to generate all variables and the frame, it keeps on returning this error: Undefined symbols for architecture x86_64: "_ECCLEVEL", referenced from: _main in dofbit-744971.o "_VERSION", referenced from: _main in dofbit-744971.o "_WD", referenced from: _main in dofbit-744971.o "_WDB", referenced from: _main in dofbit-744971.o "_datablkw", referenced from: _main in dofbit-744971.o "_eccblkwid", referenced from: _main in dofbit-744971.o "_framask", referenced from: _main in dofbit-744971.o "_framebase", referenced from: _main in dofbit-744971.o "_initecc", referenced from: _main in dofbit-744971.o "_initframe", referenced from: _main in dofbit-744971.o "_neccblk1", referenced from: _main in dofbit-744971.o "_neccblk2", referenced from: _main in dofbit-744971.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Please any help would be appreciated. I am very new to Arduino and C. Thanks

tz1 commented 9 years ago

I have only used GCC, not clang. You may only have the 32 bit libraries and are trying to compile for 64 bits or vice versa

daparra commented 9 years ago

Hi, I've trying but really I can't do to run it, the last time I uninstall all data and arduino ide and reinstall it, I make a folder called LCD and rename the lcd.c to lcd.ino, and trying compiler but show me the next message:

Arduino:1.6.5 (Windows 7), Placa:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Opciones de compilación cambiadas, reconstruyendo todo

qrencode.c:19: error: variable 'framebase' must be const in order to be put into read-only section by means of 'attribute((progmem))' extern unsigned char framebase[] PROGMEM; ^ qrencode.c:20: error: variable 'framask' must be const in order to be put into read-only section by means of 'attribute((progmem))' extern unsigned char framask[] PROGMEM; ^ variable 'framebase' must be const in order to be put into read-only section by means of 'attribute((progmem))'

This report would have more information with "Show verbose output during compilation" activala desde Archivo > Preferencias I don't understand. What can I do? Excuse me for my english... :S Thank you

daparra commented 9 years ago

I can compiller it, but now I can´t see nothing in the display, only show me a big black back end. I installed the library UTFT. The display is HX8357B size 320x480.

Thanks you Tom

dirtydevil commented 8 years ago

Thanks Thomas for the qr code generation using arduino.

I have been following the tips you gave in this issue thread. On compiling using Arduino IDE, I am getting an error "size of array 'f' is too large" in imageproc/finder.c: 4.15.

Can you please help me in solving this issue?

Thanks.

Kunal Gupta

tz1 commented 8 years ago

I don't know specifically but I suspect the IDE is set to the wrong chip or something else so that the array can't fit. Check your compile settings.