私はGenuino 101ボードを持っており、Bluetooth Low Energy [BLE]経由でAndroidと話したいと思っています。値は継続的に更新され、目標はコンマで区切られたsigned int
の文字列を送信しています。このようにまとめられた-10,21023:Genuino 101 - BLEでAndroidにcsv文字列を送信
void loop() {
float first, second, third;
if (central)
{
Serial.print("Connected to central: ");
[...]
// as long as the central is still connected:
while (central.connected())
{
[...]
String truple = String((int)first)+","+String((int)second)+","+String((int)third);
// now from here I want to send this string to the Android UI: how to?
}
私は各メッセージが20バイト以下でなければならないことを知っています。このボードには、BLE、CurieBLE.hの世話をするライブラリがありますが、ドキュメントを見て、目標を達成するための最良のアプローチが何であるかわかりませんでした。私は、アンドロイドにあなたが必要
あなたの親切な提案をありがとうウラジミールが、私は迅速に解決策を見つけた PS Genuinoの101持っ統合BLEモジュール:https://www.arduino.cc/ja/Main/ArduinoBoard101 – Antonino