-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Support for sending text to serial device over stdio? #521
Comments
So some clients already have config to change their startup command: conjure/doc/conjure-client-python-stdio.txt Lines 60 to 63 in 2482871
Maybe that could be used to instead start some other CLI program that redirects output over the network into Conjure. This is kind of a hack though really, ideally this would be built off the back of #500 (comment) Where we could write some sort of remote layer that can be plugged into any client. Orrr we do what currently works with the system, create a new client (either in this repo or outside of it, that doesn't matter, they're just Lua modules) that works in the way you need with the language you need. The last option is the thing that's actionable now, and possibly just configuring an existing client with a different startup command. Sorry that I don't have any snippets or quick answers to this, it's a tricky interesting problem. Do you think configuring an existing client would be enough? If not maybe we can copy/paste/edit another existing one and hack it into doing what you want. |
Ah ok. I was thinking of having a "serial" client, but it seems that the functionality for sending forms etc. is quite specific to the language being used. So using the example of micropython on a pi pico, you should be able to just copy the existing python-stdio lua/fennel code, and change the command from "python -iq" to "tio /dev/ttyUSB0" or "python3 -m serial /dev/ttyUSB0" to use the serial console instead? Is it easy enough to get it so you can specify which python client to connect to, and what port to use ( And the other usecase of using forth would then require a new language client then? forth is pretty easy to parse, so maybe this wouldn't be too difficult? You could have it as a stdio one like the default python client, but using gforth, and then have a second "serial" client? I might have a go at hacking the python one to work like you suggested, thanks :) |
If you want to do a "proof-of-concept" without worrying about sending forms or language being used, you can try using the SQL client. To do so:
I don't think you'll need to change the prompt pattern but if you want to try use:
I haven't tried this but I'm imagining that it should help. |
I just finished programming a Dune Worm Thumper which uses the amazing Adafruit RP2040 Prop-Maker Feather with I2S Audio Amplifier device. CircuitPython is used as the programming language. The Adafruit guides use I didn't use the So, I used the |
Hi, I really like your plugin! I definitely think its the best way to do repl driven development in neovim!
I would like to be able to use your plugin to develop/execute code on serial devices (microcontrollers) for example a microcontroller running micropython, ulisp, or some forth.
I'm not sure the best/most compatible way to do this. It would be great to be able to send data to a program, like minicom or tio, running in a different tmux split/terminal. Or perhaps provide some interface for starting repls in conjure with user provided repl programs/commands, so you could do something like
:Start-stdio "tio /dev/ttyUSB0"
(https://github.com/tio/tio). something like this could maybe allow people to start repls for a currently unsupported language as well (like gforth)?I'm not sure if this would be an easy thing to do or not. I had a look at some of the fennel code for python over stdio, but I'm not really familiar with fennel.
The text was updated successfully, but these errors were encountered: