uart.js connect directly to espruino? #1046
Replies: 4 comments
-
Posted at 2020-03-09 by Mrbbp i tried connection.close() but received an error
how to unlockStream? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-03-10 by @gfwilliams I'm not sure about If you want to use the command-line and not the browser (eg Node.js) then there's https://serialport.io/ - not quite the same API but it's a very similar idea. But from the Web Browser itself, for security they say that you have to bring up the port chooser at least once (but there's no need for the BT/USB menu). UART.js is based on Web Serial, so you could use that directly and you'd have a lot more flexibility (and avoid having the menu) - check out https://codelabs.developers.google.com/codelabs/web-serial/#3 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-03-10 by Mrbbp
this is the error from the browser... sorry ;)
i suppose the port is in use and therfor browser can not cancel connection... thanks for your time. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-03-11 by @gfwilliams
Could it be open in another browser window? sometimes you can do that with things like Web Bluetooth, and that might cause the error? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-03-09 by Mrbbp
Hello,
i'm playing with the uart.js lib to connect an espruino to a webpage.
Is it possible to connect to an espruino by command line (js) without the menu "bt4 or webserial", if i know the name of my espruino?
and can i use connection.close() (line 3) to disconnect the espruino from the page (without closing the webpage)? (to update the code in the webIDE)
i use this example
regards
é.
Beta Was this translation helpful? Give feedback.
All reactions