Skip to content
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

[FR] Support for Serial #3

Open
timonsku opened this issue Nov 15, 2018 · 2 comments
Open

[FR] Support for Serial #3

timonsku opened this issue Nov 15, 2018 · 2 comments

Comments

@timonsku
Copy link

One of the nicest features of the Arduino OSC library was the support for all kind of transports, including Serial.
Its great for non networked MCUs to have a good high level protocol to speak to a PC.
The node.js (and by that also the node-red) OSC library supports it for that reason as well.

What would you think about adding Serial support to the library?

@SpotlightKid
Copy link
Owner

Thank you for the suggestion. I think this could be added relatively easily.

For the client side, the client.Client class would need to be changed, to use a Transport class instance instead of a socket directly. The Transport class would need to provide a send and a close method. The default transport would be a UDPTransport class, which wraps the socket access.

For the server side, the server.run_server function would need to adapted, to use a Transport class instance as well, which provides a recv method (possibly in a blocking and non-blocking variant), and the server.handle_osc function needs to be adapted slightly as well.

I'll give it go when I have the time, but if you (or someone else) want to submit a PR, that would be even better! :)

@timonsku
Copy link
Author

Sounds relatively straight forward. I'm not yet very proficent in developing libraries for MicroPython, I might find time next year to get into it if you don't find the time or motivation :)
Will ask in here again if nothing happened by anyone by then before coding something to avoid dupe work.

@SpotlightKid SpotlightKid changed the title Support for Serial [FR] Support for Serial Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants