Node.js Javascript
Javascriptライブラリ
Section titled “Javascriptライブラリ”KeiganMotor 用の Node.js (JavaScriptベース)ライブラリです。
Node.js では USBシリアル・BLE、ブラウザでは WebBluetooth (※) を用いて接続出来ます。
ソースコードはオープンソース(MITライセンス)になります。
WebBluetooth は、ブラウザから Bluetooth を操作する技術です。2022/1時点で、Mac版 Chrome、(Windows10及び11版 Chrome、Linux版 Chrome と Android版 Chrome (Androidの標準ブラウザ) でサポートされています。WebBluetooth ブラウザ対応状況[Can I Use]
ソースコード(GitHub)
Section titled “ソースコード(GitHub)”https://github.com/keigan-motor/kmconnector-js
WebBluetooth動作デモ(Android、Mac版Chromeのみ)
Section titled “WebBluetooth動作デモ(Android、Mac版Chromeのみ)”https://keigan-motor.com/apiSample/motorApiSample/
APIドキュメント
Section titled “APIドキュメント”https://document.keigan-motor.com/apiDocument/kmconnector-js/
インストール
Section titled “インストール”Node.js
Section titled “Node.js”Node.js では npm コマンドからインストールできます。
$ npm install kmconnectorブラウザ(WebBluetooth)
Section titled “ブラウザ(WebBluetooth)”ブラウザでは kmconnector/indexBrowser.js のみ使用します。
GitHubからソースコードをダウンロードし html のヘッダーファイルに組み込んで下さい。
サンプルファイル等
Section titled “サンプルファイル等”基本的なサンプルファイルは、ソースコード内 examples/ に含まれます。
Node.js APIドキュメント
Section titled “Node.js APIドキュメント”APIドキュメントは以下URLから参照ください。
© Keigan Inc.
