Arduino の シンプルなBle ターミナルです。Arduino IDEのシリアル ターミナル、シリアル プロッターのような機能をBLE通信で実現します。
This is a simple BLE terminal for Arduino. It realizes functions like the serial terminal and serial plotter of the Arduino IDE via BLE communication.
How to use(利用方法)
App Storeで”Easy ArduinoBleTerm”で検索して、インストールしてください。(現在申請中)
Search for “Easy ArduinoBleTerm” in the App Store and install it. (Currently under application)
Arduinoでのソースは以下のような感じです。
ライブラリは、ESP32_BleSerialを使用しました。
The Arduino source looks like this.
The ESP32_BleSerial library was used.
#include <BleSerial.h>
BleSerial ble;
void setup() {
Serial.begin(115200);
// アドバタイズ名を設定(アプリのスキャン画面に表示されます)
ble.begin("MyESP32Device");
}
void loop() {
static float theta = 0;
theta += 2 * 3.14 / 360;
// カンマ区切りでデータを送信(プロッターで表示可能)
float sensor1 = sin(theta);
float sensor2 = cos(theta);
ble.printf("%.3f,%.3f\n", sensor1, sensor2);
// BLEからの受信データをシリアルに転送
while (ble.available()) {
Serial.write(ble.read());
}
delay(10); // 100Hz
}
Privacy Policy(プライバシーポリシー)
Support
連絡先: nw.lab.jp@gmail.com