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

Add a function to close the serial port #2

Open
olmerg opened this issue Jul 26, 2018 · 1 comment
Open

Add a function to close the serial port #2

olmerg opened this issue Jul 26, 2018 · 1 comment

Comments

@olmerg
Copy link

olmerg commented Jul 26, 2018

The object to close the serial port is not accesible , os will be good have a function for close the port.

        function close_port(obj)
      % tells if msg is an ip address, returns the ip and port if so.
        if obj.connection_type == 'serial'
          fclose(obj.connection);
        endif
    endfunction

Maybe also is important to review is the port is open (during constructor) to generate this error an not
error: Invalid call to arduino. Correct usage is:

@Molorius
Copy link
Owner

Thank you for the suggestion, but I will have to decide how to close the port so it is still Matlab compatible.

I will have it display a better error message within the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants