Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use this sketch? #2

Open
daparra opened this issue Jul 1, 2015 · 13 comments
Open

How can I use this sketch? #2

daparra opened this issue Jul 1, 2015 · 13 comments

Comments

@daparra
Copy link

daparra commented Jul 1, 2015

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
Copy link
Owner

tz1 commented Jul 1, 2015

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
Copy link
Author

daparra commented Jul 1, 2015

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
Copy link
Owner

tz1 commented Jul 1, 2015

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
Copy link

itsfever commented Jul 8, 2015

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
Copy link
Owner

tz1 commented Jul 8, 2015

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
Copy link
Author

daparra commented Jul 8, 2015

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

@itsfever
Copy link

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

@ghost
Copy link

ghost commented Jul 20, 2015

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
Copy link
Owner

tz1 commented Jul 27, 2015

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
Copy link
Author

daparra commented Jul 29, 2015

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
Copy link
Author

daparra commented Aug 5, 2015

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
Copy link

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
Copy link
Owner

tz1 commented Feb 25, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants