Giter Site home page Giter Site logo

cserial's Introduction

Build status

C MEX interface for serial port by implementing c_serial code base: https://github.com/rm5248/CSerial

Install

On Nelson >= 0.4.6 :

nmm('install', 'https://github.com/NelsonModules/cserial.git#master')

On Scilab 6.1:

atomsInstall('cserial')

Build

On Nelson >= 0.4.6 :

run('builder.nls');
run('loader.nls');
doc cserial

On Scilab 6.1:

exec('builder.sce');
exec('loader.nls');

On Octave or Matlab:

run('builder.m')

Builtin availables:

  • getPortNames() returns a cell with available ports.

  • id = openPort(port, baudrate [, databits [, stopbits, [parity, [flowcontrol, [rtscontrol]]]]])

    • supported baud rate: 0, 50, 100, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 115200, or 921600.
    • data bits: 5, 6, 7, or 8.
    • stop bits: 0 or 1.
    • parity: 'none', 'odd' or 'even'.
    • flowcontrol: 'none', 'hard' or 'soft'.
    • rtscontrol: 'none', 'hard', 'soft', or 'best'.
  • [data, nbBytesReceived] = readPort(id, numBytesToRead) read data from port.

  • writePort(id, data) write data on serial port. data must be uint8 or char.

  • closePort(id) closes an port opened.

  • flushPort(id) flushs desired port.

  • st = getPortConfig(id) returns struct with port informations.

Example: https://github.com/NelsonModules/cserial/blob/master/example/example.m

This toolboxe is an good example to show how it is easy to use existing C MEX builtin with Nelson. This toolbox works on Nelson and all others tools fully compatible with C MEX API.

Allan CORNET ([email protected]) - 2020

cserial's People

Contributors

nelson-numerical-software avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.