Serial
This plugin provides functions for working with Serial connections
https://github.com/xseignard/cordovarduino
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation#
- Capacitor
- Cordova
- Enterprise
$ npm install cordovarduino $ npm install @ionic-native/serial $ ionic cap sync
$ ionic cordova plugin add cordovarduino $ npm install @ionic-native/serial
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
#
Supported Platforms- Android
- Ubuntu
#
Usage#
ReactLearn more about using Ionic Native components in React
#
Angularimport { Serial } from '@ionic-native/serial/ngx';
constructor(private serial: Serial) { }
...
this.serial.requestPermission().then(() => { this.serial.open({ baudRate: 9800, dataBits: 4, stopBits: 1, parity: 0, dtr: true, rts: true, sleepOnPause: false }).then(() => { console.log('Serial connection opened'); });}).catch((error: any) => console.log(error));