Try this instead.
void onBluetoothDataEvent(String who, byte[] data) {
Str = new String(data);
background(int(Str));
}
And leave draw() empty.
Try this instead.
void onBluetoothDataEvent(String who, byte[] data) {
Str = new String(data);
background(int(Str));
}
And leave draw() empty.