Skip to content

hisham-assi/OsensaMatlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OsensaMatlab

OsensaMatlab (by Hisham Assi) tells Matlab users how to access the python library osensapy in Matlab. Osensapy a Python module interfacing with the OSENSA transmitters.

  • First, you need to configure your Matlab system to use Python.
  • Then you need to install osensapy: pip install osensapy; make sure to install it in the same python environment that you linked to Matlab.
  • Import osensapy by this Matlab command: osensapy=py.importlib.import_module('osensapy'), the outcome will be somthing like:
    osensapy = Python module with no properties.
    <module 'osensapy' from 'path\\ to\\ osensapy\\ __init__.py'>
    
    Go to this osensapy folder, first, delete the file __init__.py, then rename the file osensapy.py to __init__.py
  • Now you can access the Transmitter calss methods by calling the Matlab function
    transmitter=get_osensa_transmitter(port_name)
    
    where port_name is the name of the serial port connected to Osensa transmitter (for example 'COM5')
  • All the the Transmitter function descibe in OsensaPy Guid , namley, the ones with format transmitter.some_function() can be accessed with same way. For eaxample to read the transmitter serial number, one needs to use Matlab command
    transmitter.read_serial_number()
    
    Note the command transmitter.fast_batch(3) needs to be, in Matlab:
    transmitter.fast_batch(uint16(3))
    
  • Don't forget to close the transmitter when you are done
    transmitter.close()
    

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages