Open moof-moof opened 1 year ago
yes... this has been kind of a long time coming.
The webSerial API is now available and should be usable as a replacement for the chrome.serial API which is used to actually connect to your machine and send bits. This API is also usable from regular web pages so the need for a chrome app isn't really a problem. https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API
Offline use cases would need to use a progressive web app (PWA).
I've been meaning to make the necessary updates here, but time has been in short supply.
Thanks for your quick response and explanation. Iām somewhat less worried now :-)
I came here from https://www.youtube.com/watch?v=lR5QjnohsRk. We (https://www.north27.co.uk/) support a number of Chrome OS based schools who I think would find this very useful. @sir-buckyball nice work! Maybe if time is short you could reach out for support here: https://summerofcode.withgoogle.com/
@sir-buckyball any advice on how exactly to use Web Serial API for sending G-code to a printer? I've been trying for a while now but with no luck. I just posted this question on the 3D Printing Stack Exchange to see if the internet community has any ideas.
I'm not looking for a full app, just a simple script that will connect and send a single G-code to my printer... then I think I can take it from there.
Awesome, I just found the answer to my own question! Turns out it is possible to send G-code to a printer from a web browser with just a few lines of JavaScript! š
@moof-moof @sir-buckyball @andrewhowden if anyone is interested I built this simple terminal-style app for sending G-code to a 3D printer using Web Serial API. It should work with any compatible browser (Chrome, Edge and Opera) and is also usable offline if you clone the repo and open the sender.html
file in your browser.
@jgphilpott Cool! I will have a look at your solution when I return from vacation.
Looks great! I'll hopefully have a chance to test over the Easter break.
On Sat, 23 Mar 2024 at 18:45, Loxia labs @.***> wrote:
@jgphilpott https://github.com/jgphilpott Cool! I will have a look at your solution when I return from vacation.
ā Reply to this email directly, view it on GitHub https://github.com/sir-buckyball/chrome-gcode-sender/issues/57#issuecomment-2016572921, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKIL3TLIWOFBMXKVSOQZXALYZXES7AVCNFSM6AAAAAAQXW7LL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWGU3TEOJSGE . You are receiving this because you were mentioned.Message ID: @.***>
--
This message and any attachments are intended solely for the use of the intended recipient, and they are confidential and may be privileged. If you have received this email in error, please notify us immediately and delete it from your system. Do not forward or disclose its contents to any third party. Whilst we believe this email to be free of viruses, we cannot accept responsibility for any electronic infection that it may have transmitted.
@jgphilpott I have now had time to test your terminal-style app. It looks very nice and well thought out. More importantly perhaps, using it it was super easy to establish a connection to the GRBL-based controller on my cnc-machine. Definitely a step-up compared to simply using the command line for control.
However, I have found a couple of "imperfections" that maybe you can help me to improve.
Firstly, the return-stream from the device (GRBL in my case) does not display properly in the Output window. The lines are not printed out full-length (that is to the newline character) but instead chopped up randomly into very short lines, only about four characters long on average! This does not happen when using other terminal apps, so I guess the problem is not on the sending side. Please see attached screenshots showing the incorrect output versus what it looks like in a regular terminal.
Do you have any ideas what may be the cause, and where in the code it may be fixed?
Secondly, for my use-case it would be ideal to be able to upload complete gcode files from within the app via a file selection dialog, as opposed to just pasting the commands in chunks into the prompt textarea.
Being more used to C and Python, but much less familiar with JavaScript, I could definitely do with informed ideas on how to implement that feature, too.
@moof-moof I'm glad you got the chance to test it out and that the connection process ran smoothly! With regard to your comments, I think it is best to move the conversation off of this thread. I have created two issues in my repo and added my response in the comments.
1) Response data comes in small/short chunks making it hard to read 2) Add the ability to upload a complete G-code file rather than typing or pasting commands into the text input
I have been using gcode-sender, or rather my forked version of it, to control a homemade 2D jigsaw cutter. I find it a superb app, perfect for my use. I recently became aware of the fact that Google is is soon migrating Chrome "Apps to Progressive Web Apps", and it worries me that gcode-sender may then stop functioning. I quote:
Do you have any advise on what to do avoid this threat, and hopefully continue using gcode-sender?