Help us understand the problem. What is going on with this article?

ProcessingでAndroidのBluetooth通信テスト

More than 5 years have passed since last update.

Android>Sketch Permissionsから以下をチェック
スクリーンショット 2015-02-26 14.19.39.png

スクリプトはこんな感じで書いて書き出し。

import android.bluetooth.BluetoothAdapter;
BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter();

void setup(){
 //orientation(LANDSCAPE);
}

void draw(){
 if(bluetooth.isEnabled()){
 background(255,0,0);
 } else {
 background(0,0,0);
 }
}

通信が出来たらAndroidの画面が赤くなるのでそれで成功です。

amano-kiyoyuki
絶対領域拡張計画「光るスカート」の開発者。 モノづくり楽しすぎ。
http://www.kayac.com/team/amano-kiyoyuki
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away