-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
I'll have time to get back to this on Monday |
@dherrada Do you have a printer you can test with? |
@tannewt yep. I can test this Monday or Tuesday if that’s soon enough |
@dherrada That'd be great! Thanks! |
Do you have an idea how to require installation of numpy, imageio and math but only in case you are using bitmap printing? Any ideas? |
@greg-elmi What about a separate library? That will allow you to split requirements and imports. If you just want to split imports, you could create a separate module. It could take in the basic thermal printer object. |
@tannewt For now I'll just add new positions to requirements.txt. I'll think about better separation in future pull requests |
@dherrada Have you tested this yet? |
@tannewt Nope, I've been pretty busy with school this week, so I haven't really had a chance to. I will possibly have some time tonight to test, but if I don't, I'll definitely test tomorrow. Sorry for the delay. |
@greg-elmi Is there any way you could make this not use imageio and numpy? The reason for that is that (to my knowledge) they are not available for circuitpython, so we wouldn't be able to use them with CircuitPython boards. |
@greg-elmi aside from that, this is actually really good. I know there are ways of doing all the stuff that you used imageio and numpy for in circuitpython, although it probably won't be as clean. |
@dherrada I don't know. I haven't used circuitpython. I'll read about it and try. |
@greg-elmi Yeah, I never really got to it. |
Right now I am doing other project but I'll sit to it when I'll finish it (don't hold your breath) |
@dherrada Have you had a chance to take a look at this? |
@kattni If by take a look at it you mean test it, then yes. I tested it on the Pi and it worked. I didn't test it on a CircuitPython board since it uses libraries not available for CircuitPython. If you mean to try to adapt it to work with CircuitPython as well, then no. |
Proposal
|
The file
The CircuitPython libraries don't exactly match the currently imported libraries. I took a quick look at it, the main work is in the |
@kattni |
@greg-elmi Thanks again for your contribution. After a deeper reflecting on this:
Let me know your thoughts. Thanks again. |
@jposada202020 Feel free to do with this PR whatever you want. I don't think I'll have time to conform with your design rules as we moved on with our project and this portion of code is already approved (We are not planing to work on it any time soon). As I understand It wont work on CircuitPython boards because of the bloated libraries (numpy and imageio). So in this form I suppose you should close the pull request. But I think it should be visible for people like me who use CircuitPython on Raspberry Pi and don't care. For people working on CircuitPython boards I suggest for now such workaround (I didn't test it): Modify on a PC. but instead it will pickle then you can transfer result files on a board and use |
Thanks will do :) |
I will close this for now, you have a good point for the visibility if someone could work in getting the code according to the standard, that could be in an example or in the community bundle. |
Hello @greg-elmi I am a raspberry pi user to with a new Adafruit Thermal Printer. A2, GV2.19.08 Thanks |
@Domanaik Yeah so you're going to want to clone https://github.com/greg-elmi/Adafruit_CircuitPython_Thermal_Printer and then run the example @greg-elmi created |
Hello @dherrada Thanks for helping me. Im sorry, im kinda new to python.. I only working with C# and PowerShell ;( I cloned it. The example is running, but in the example the part with print_bitmap is missing. Sadly i dont know how to import the new file. |
@Domanaik I think you need to make sure that the adafruit version of thermal printer isn't installed. I think you're going to want to uninstall it with pip/pip3 and then run the example from the top-level directory of greg-elmi:master |
That in fact states you have newer firmware than 2.168 as 2.168 is 2.16.08, which i worked with |
Works at firmware 2.168. Should work on 2.68 but all the new methods are contained in thermal_printer_2168.py file.
I tested only on printing bitmaps so setting timeouts for communication was irrelevant but if it will be I'll fix it
Potentially closes #16