Our website uses necessary cookies to enable basic functions and optional cookies to help us to enhance your user experience. Learn more about our cookie policy by clicking "Learn More".
Accept All Only Necessary Cookies
Bluetooth Joystick Controller 图标

Bluetooth Joystick Controller


UHOROBO
1.04
  • 2022年04月23日
    Update date
  • Everyone
  • Android 4.1+
    Android OS

关于Bluetooth Joystick Controller

连接到蓝牙设备(例如 ESP32)并允许您将智能手机用作控制器的应用程序

下のほうに日本語版記載してあります

///////↓English///////

1.

If you press the Bluetooth icon on the upper right of the app bar, the screen for selecting the Bluetooth device set for the device will be displayed. Select the device you want to connect to. * Please set the pair with the Bluetooth terminal in advance.

2.

Attempts to connect to the selected Bluetooth device. Hopefully it will connect, otherwise it will not connect. When connected, the Bluetooth icon at the top right of the app bar will change to a connection mark.

3.

When connected, the smartphone will send the controller status data (see below for details) to the Bluetooth device. The upper half of the screen (the part where the comment at the top of the controller is displayed) displays the data sent from the Bluetooth terminal.

4.

If you want to disconnect from the device, press the Bluetooth icon at the top right of the app bar. Disconnected from the terminal

5.

If you set it to the horizontal screen, it will extend horizontally.

Controller transmission data details

・ We are sending 3 bytes of data.

・ The 1st byte is the state of the push button. Button1 ~ 4 = 0b01111.

・ The 2nd byte is the joystick X coordinate data 0 ~ 255 (127 in the center).

・ The 3rd byte is the Y coordinate data of the joystick 0 ~ 255 (127 in the center).

3Byte data of is sent from the smartphone at intervals of 50ms.

///////日本語///////

1.

アプリバー右上のBluetoothアイコンを押すと、端末に設定されているBluetooth端末を選択する画面になります。接続したい端末を選択してください。※事前にBluetooth端末とのペア設定をしておいてください

2.

選択したBluetooth端末と接続を試みます。うまくいけば接続し、うまくいかなければ接続されません。接続した場合はアプリバー右上のBluetoothアイコンが接続マークに変化します。

3.

接続された場合、スマホからはコントローラーの状態データ(詳細は下記を参照)をBluetooth端末に送信します。画面の上半分の部分(コントラーの上部のコメントが表示される部分)はBluetooth端末から送られてきたデータを表示します。

4.

端末と切断したい場合はアプリバー右上のBluetoothアイコンを押してください。端末と切断されます

5.

横画面にすると横にのびます

コントローラの送信データ詳細

・3Byteのデータを送っています。

・1Byte目は押しボタンの状態。Button1~4 = 0b01111。

・2Byte目はジョイスティックのX座標データ0~255です(中央は127)。

・3Byte目はジョイスティックのY座標データ0~255です(中央は127)。

の3Byteのデータを50ms間隔でスマホから送ります。

///Arduino Sample Sketch////////////////////////

#include "BluetoothSerial.h"

#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)

#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it

#endif

BluetoothSerial SerialBT;

void setup() {

Serial.begin(115200);

SerialBT.begin("ESP32test"); //Bluetooth device name

}

void loop() {

//Bluettthでデータを送る処理

int sendNum = Serial.available(); //送る文字列数を取得

if (sendNum) { //送る文字があれば入る

for(int i=0 ; i <= sendNum-1 ; i++){ //文字数分ループ

SerialBT.write(Serial.read()); //一文字ずつ送信

}

}

//Bluetoothで取得したデータをシリアルコマンドに表示する処理

int receiveNum=SerialBT.available(); //Bluettth受信バッファにあるデータ数を取得

if (receiveNum) { //受け取るデータがあれば入る

Serial.print(millis()); //プログラムが実行されてからの経過時間を表示(100ms間隔で受信してることを確認するため)

Serial.print("ms  ");

for(int j=0 ; j <= receiveNum-1 ; j++){ //データ数分ループ

Serial.print(j);

Serial.print("Byte=");

Serial.print(SerialBT.read()); //1Byteごとにデータを取得

Serial.print(" ");

}

Serial.print("\n");

}

delay(10);//Serial.printfが画面表示終わるの待つため

}

////////////////////////////////////////////////////////

Blog Link : https://kousakutanosii.hatenablog.com/entry/2022/01/18/224100

更多

更多应用信息

最新版本

1.04

上传者

Orlando Sender

系统要求

Android 4.1+

内容分级

Everyone

最新版本1.04更新日志

Last updated on 2022年04月23日

Minor bug fixes and improvements. Install or update to the newest version to check it out!

更多

Bluetooth Joystick Controller 屏幕截图

Bluetooth Joystick Controller 海报Bluetooth Joystick Controller 截图 1Bluetooth Joystick Controller 截图 2Bluetooth Joystick Controller 截图 3Bluetooth Joystick Controller 截图 4Bluetooth Joystick Controller 截图 5Bluetooth Joystick Controller 截图 6Bluetooth Joystick Controller 截图 7

相关标签

24 小时热门文章

订阅APKPure
第一时间获取热门安卓游戏应用的首发体验,最新资讯和玩法教程。
不,谢谢
订阅
订阅成功!
您已订阅APKPure。