Bluetooth Joystick Controller

UHOROBO
Apr 22, 2022
  • 2.0 MB

    Dung lượng tệp

  • Everyone

  • Android 4.1+

    Android OS

Giới thiệu về Bluetooth Joystick Controller

Một ứng dụng kết nối với thiết bị Bluetooth chẳng hạn như ESP32 và cho phép bạn sử dụng điện thoại thông minh của mình làm bộ điều khiển

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

///////↓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

Hiển thị nhiều hơnHiển thị ít hơn

What's new in the latest 1.04

Last updated on Apr 22, 2022
Minor bug fixes and improvements. Install or update to the newest version to check it out!

Thông tin APK Bluetooth Joystick Controller

Phiên bản mới nhất
1.04
Danh mục
Năng suất
Android OS
Android 4.1+
Dung lượng tệp
2.0 MB
Nhà phát triển
UHOROBO
Xếp hạng nội dung
Everyone
Tải APK an toàn và nhanh chóng trên APKPure
APKPure sử dụng xác minh chữ ký để đảm bảo tải APK miễn phí virus cho Bluetooth Joystick Controller.

Phiên bản cũ của Bluetooth Joystick Controller

Tải xuống siêu nhanh và an toàn thông qua Ứng dụng APKPure

Một cú nhấp chuột để cài đặt các tệp XAPK/APK trên Android!

Tải về APKPure