タッチ操作ができるM5Stack CORE2 ならではの画面操作とEncoderFaces (ホイール)を組み合わせ、ミニマルに生かしました。
M5Stack(ESP32)には自らをBluetoothマウスにする方法もありましたが、Windowsだとデッドゾーン(誤操作防止により数ドット以下の移動量は無効とする機能)があったので、UART信号をマウス移動に変換するアプリケーションの開発(C#)まで行いました。
We combined the screen operation of the touch-enabled M5Stack CORE2 with the EncoderFaces (wheel) and made the most of it in a minimalistic way.
The M5Stack (ESP32) also had a way to turn itself into a Bluetooth mouse, but Windows had a dead zone (a function that disables movement of a few dots or less to prevent accidental operation), so I even developed an application (C#) that converts UART signals into mouse movement.
Bluetooth で通信
通信信号をマウスの移動量に変換するソフトウェアを開発(VisualStudio C#)
Communication via Bluetooth
Developed software to convert communication signals into mouse movements (VisualStudio C#)
「あと1ドット右に移動したい!」マウスを使っている方は1度でも思ったことは無いでしょうか?そういった要望に応え、上下左右1ドット単位の精密移動がダイヤルで出来ます。
通常はマウスの補助ツールとして利用しますが、使わなくても傍に装備しておくとカッコいいです。
昔のiPod等についていた「クリックホイール」・ガラケーについていたジョグダイアル・Let'sNoteの丸いマウスパッドの側面をなぞるような感じで、ダイアルを指でグルグル回すことにより、既存のマウスホイールとは異なり、シームレスにスクロールすることが出来ます。(何故かノスタルジーを感じます)
M5Stack CORE2のタッチ画面操作を生かし、X軸・Y軸・スクロールやクリック操作のモードチェンジが出来ます。 ダイアルを回して、マウスを操作します。マウスに関する事はほとんど可能です。
移動量(1度にどのぐらい移動するか)の変更も可能です。画面操作でモード切替した後、ダイアルで値を決定します。
"I want to move one more dot to the right!"... If you are using a mouse, have you ever thought that at least once? In response to such a request, you can use a dial to move the mouse up, down, left, right, or right by one dot.
You can scroll seamlessly by turning the dial with your finger, just like the "click wheel" on old iPods, the jog dial on Galakei, or the round mouse pad on Let'sNote. (For some reason, I feel nostalgic. (I feel nostalgic for some reason.)
Taking advantage of the touch screen operation of the M5Stack CORE2, you can change the mode of X-axis, Y-axis, scrolling, and click operation. Turn the dial to control the mouse. Almost everything related to the mouse is possible.
You can also change the amount of movement (how much movement at a time). After switching the mode by screen operation, use the dial to determine the value.
以下デバイスを用意します。
(※ 自己責任でお願いします。2021年時点の情報です。情報が古いと動作しなくなる可能性があります) 悩み相談レベルであれば相談乗ります。 @rawseq 発展的なご相談も吝かではないです。
どうやってインストールするかは上記スライドで解説していますので 画面に従うと簡単に作れます。
どういった動きなのかが確認できます。
◆ ファームウェア(M5Stackに書き込むファイル)はオープンソースで公開しています。
GitHub (M5MouseWheel)
https://github.com/RAWSEQ/M5MouseWheel
こちら firmware / m5mw.m5f
のファイルを以下UiFlowで開くとどういった内容で動いているかを確認できます。
UiFlow(ウェブアプリ)
https://m5stack.github.io/UIFlow_doc/ja/
改造したファームウェアの書き込み方法は上記URLのマニュアルに記載されています。
◆ ソフトウェア(Windows側で動かすファイル)はオープンソースで公開しています。
GitHub (M5MouseWheel)
https://github.com/RAWSEQ/M5MouseWheel
https://github.com/RAWSEQ/M5MouseWheel/tree/master/software
こちらをクローン(ダウンロード)すると Microsoft Visual Studio 2019 のプロジェクトファイルとして 開くことが出来ます。Microsoft Visual Studio 2019 の開発環境が必要ですが、オープンソース参加意図であれば自由にインストールできます。
◆ ソフトウェアの拡張をしたい・Windowsのみ対象でマウスコントロールと干渉させたくない場合はこちら。
https://github.com/RAWSEQ/M5MouseWheel
◆ Windowsの他Macやスマホにも使いたい場合はBluetooth(LE)の標準入力デバイスとして。マウス単体としてプログラムすることが出来ます。