Comments (34)
The hosting company cancelled my website by accident and you have to use http://davedarko.com/gameboy.php instead of http://davedarko.de/gameboy.php now since I lost my domain. The applet is written in java and I'm not sure where that code could be.
I wrote some JS on http://davedarko.com/canvas/ where I used a HTML5 canvas element to draw the pictures and write in a textarea which gives me my the data the applet would generate. I put all the code I found to get started in the /res/php folder.
from gbprinter.
I may add a file picker and rewrite it completely based on jquery, but for now I hope it helps to have the php stuff, feel free to close the issue or give me some more informations what went wrong.
from gbprinter.
Ok, so late last night I was able to print one of the example pictures from your site. It was a single row of the word, "fuck!" My attempt at printing more than one row was halted after that. I tried printing 8 rows of the same strip ("fuck!") in hadCon(), and that worked, but not 8 different strips. Trying to uncomment the printRow(row0-7) resulted in no action also.
Is this a memory issue with my Arduino?
from gbprinter.
I'm not sure, I had memory issues with my chinese modules printing more than two rows because their memory seems to be around 9k instead of 32k. I'm a mac/linux guy and could not get the visual basic stuff from furtek running. About the fucks, that may be a bad choice of words... but I got frustrated along the way and this became my test graphics ;)
Any warnings in the arduino console when you add more then one row? How big is your sketch? The command "!" seems to work printing two rows a time and then you have to repeat for the next, I never had that serial thing running and just guessed it should work like that - it wasn't meant to print from memory as well.. I'm inspired to get into that again this night, hope I find something.
from gbprinter.
This is the official Uno model that I bought locally, and the IDE is saying max 320000 or so, so I assume it's regular memory. It's my first day with the Arduino and have been wanting to do this for a very long time :)
Also, I am a Mac/Linux guy too :D but I tried running the VBasic through WINE without success, and this is method doing much better than I had hoped.
Below is my review with the jumper in TX and RX:
Anyway, the console shows this when I successfully print "fuck" 10 times:
Gameboy Printer for Arduino Init Inq Data Print
And when I try to print this photo of you (or could be Jackson Palmer, creator of Dogecoin) it does not show anything on the console, and does not print.
Console commands ("!", "?") are not usable in either state.
Now without the jumper
At this point I have reset the code all back to default (excluding the unneeded while !serial loop) and took out the jumper. When I try the console command "!" it prints blanks forever. Not stopping until I reset everything. The ? returns a 0.
I cannot for the life of me figure out how to print the rows unless I put them under hadCon(). In that point, I can only print 2 rows anyway. I'm not sure why it will print 2 rows there, and not in ddimg().
from gbprinter.
Ok, now when I type D in the console, it will print a single row, but will crash if I try more than that
from gbprinter.
ddimg() sends more then two packages and my guess is that the printer only accepts two, then needs the init inq data print stuff and then you can send it again?
maybe this works?
void ddimg () {
Serial.println("Init");
sendInitialize();
getStatusCode();
sendRow(row0);
sendRow(row1);
Serial.println("Inq");
sendInquiry();
Serial.println("Data");
GBPCommand(GBData,0);
printStatusCode(-1);
Serial.println("Print");
sendPrint(1,3,0xE4,0x40);
printStatusCode(-1);
sendRow(row2);
sendRow(row3);
Serial.println("Inq");
sendInquiry();
Serial.println("Data");
GBPCommand(GBData,0);
printStatusCode(-1);
Serial.println("Print");
sendPrint(1,3,0xE4,0x40);
printStatusCode(-1);
sendRow(row4);
sendRow(row5);
Serial.println("Inq");
sendInquiry();
Serial.println("Data");
GBPCommand(GBData,0);
printStatusCode(-1);
Serial.println("Print");
sendPrint(1,3,0xE4,0x40);
printStatusCode(-1);
sendRow(row6);
sendRow(row7);
Serial.println("Inq");
sendInquiry();
Serial.println("Data");
GBPCommand(GBData,0);
printStatusCode(-1);
Serial.println("Print");
sendPrint(1,3,0xE4,0x40);
printStatusCode(-1);
}
from gbprinter.
I tried this, and it seems to be an error for every time I try to do more than 2 sendRow()'s in the whole code. It doesn't even start if more than 2 rows are being attempted.
from gbprinter.
Concluded it is an issue with sendRow(), but I have no idea what it is.
from gbprinter.
last idea without a physical way to test it would be to send one row and hit the "Init Inq Data Print" after every row. It may be that the gameboy printer times out after sending two rows. I will check the furrtek stuff from http://furrtek.free.fr/?a=gbpcable&i=2 against the Miles Burton code..
thank you for working on this by the way!
from gbprinter.
Again, my first time on Arduino, surprised I made it this far :D
And no, thank you! I will try to send one row at a time and tell you how it goes.
from gbprinter.
Ok, so I made it do the "Init Inq Data Print Init Inq Data Print Init Inq Data Print" instead of skipping the Init like ddimg tries to do. It sends! But it send all the bytes at once, and the printer ends up printing a funky bar. I guess that leaves me with timing?
How do I check for "a"?
If it would help, I can fork your project and post what I am trying.
from gbprinter.
feel free to fork :) Ha, I forgot the init stuff. But I guess the following code for each row won't help either?
sendInitialize();
getStatusCode();
sendRow(row0);
sendInquiry();
GBPCommand(GBData,0);
printStatusCode(-1);
sendPrint(1,3,0xE4,0x40);
printStatusCode(-1);
from gbprinter.
ah, sorry, seems that is exactly what what you did.
from gbprinter.
try adding delayMicroseconds(100) after the printStatusCode stuff, maybe this gives him some time to digest.
from gbprinter.
I think the miles burton code I used to form this library was not the best to start with. I think I will use start with furrteks code for the attiny45 all over.
from gbprinter.
Do you happen to know how to check for the printer's response of "a" (saying it's ready)?
from gbprinter.
Furrtek devided the 640 bytes into 10 chunks of 64 bytes because the printer was not fast enough on the serial, but since we print from memory that should not be important. that would be a response from the furrtek code on the attiny45, the code is:
for (b=0;b<10;b++) {
SerialPut('a');
for (c=0;c<64;c++) {
buffer[c] = SerialGet();
}
for (c=0;c<64;c++) {
cmd = buffer[c];
GBSerialOut(cmd);
CRC += cmd;
}
}
from gbprinter.
I'm at work, so I can't tinker at the moment, but before I left, I tried the delay, and that did not help. Is there a known trigger for telling if the previous line is done
from gbprinter.
I think I found the problem... the main loop can't handle too many arrays in sram so more than two 640 bytes arrays will kill the arduino because there is only 2048bytes of sram.
I had to leave them in the flash memory and work with progmem for the first time, but now you can use more arrays and finally print pics :) I will update the library in a minute, check the buffered example :) Thanks for the motivation, learned a lot tonight!
http://playground.arduino.cc/Main/CorruptArrayVariablesAndMemory#Array_example_and_comparison
from gbprinter.
You were an unbeleivable help. I really have been into software for a very long time, and am making my way into hardware more recently, not a single project I have done has had a creator put so much effort into fixing the issues I had.
I will report back the results tonight or tomorrow, as I have a few thing I need to get done and then off to bed.
Hopefully this solves the issue for many others 😄
from gbprinter.
Well that was bugging me too for a long time so I needed to fix that :) I think the next step will be to get sending the data via serial to work, so I don't have to program the arduino for every picture...
it seems that there is a maximum row count on the printer side to receive between the init and the inquiry stuff, so there needs to be a check every 8 rows whether the printer is still printing.
from gbprinter.
Okay, on http://davedarko.com/canvas/ you can now select you own photos and get updated progmen arrays :) it should be possible to print some lengthy pictures now, with more than 10 rows! I was able to print the macgyver on http://davedarko.com/gameboy.php :)
from gbprinter.
I see exactly what the buffer does now :D
I ran out of paper trying this out, so I have to order more, but I did happen to print your default photo on the last bit.
After a little more understanding of how the Arduino works, I'd like to look into printing words and "receipts."
from gbprinter.
Oh wow, you commented just as I did, awesome! I'll check it out
from gbprinter.
I found some rolls on amazon, but it took me a while. 38mm thermopaper is not so common, but you can cut down some receipts or bigger rolls for a MacGyver solution ;)
Would be cool to have the "arduino prints twitter stuff on game boy printer" option or grocery lists :D
from gbprinter.
Wow, that works great! I'm loving how easy it makes it. I'm picking up more 1 1/2" calculator paper from the store today (or ordering if they are out again) and will try when I am home.
Have you tested large/small images in it yet? Does it handle them well?
And I would love a hard copy twitter :D
My main use for this would be, since I am trying to launch my Retro Video Game online store, I'd like to have physical receipts printed from this, or even have my orderbook printed on this so I can keep up with it. Just the novelty of it would make the experience a little better.
from gbprinter.
And yeah, my previous roll was a sawed in half receipt roll.
from gbprinter.
I think pictures have to be resized before, or otherwise the javascript renders a lot. It will make a resized copy and then create the canvas from it but I tested some bigger files and they crashed or I was to impatient :D
Well there are certainly faster and bigger thermo printers out there with usb and drivers and stuff, but this is more fun :)
from gbprinter.
And cheaper. I bought the arduino uno, the usb cable, a lot of shields, and wires locally at a RadioShack. Only cost me $35 somehow. The printer was also bought locally for $10. I got a great deal.
The bigger printers for actual use cost in the $100s.
More fun, cheaper, and also GameBoy printer in a retro video game store receipt makes more sense :)
from gbprinter.
Also I am learning. I'm trying to walk myself through what you did to make it work.
from gbprinter.
Do you have a source for the /canvas? I would like to try to run this locally
from gbprinter.
I've added the fileloader changes to the canvas stuff. You can find all the php and JS code in https://github.com/davedarko/GBPrinter/tree/master/res/php
from gbprinter.
Thanks man, you've been a big help
from gbprinter.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gbprinter.