Bluetooth and AppInventor Issues

Hi , I'm developing an app that allows you to read data coming from Arduino through a potentiometer and compare it with another variable set through a texbox and a button. In the app I can receive the data, but when I insert the last two blocks with the IFs, I get errors such as: "The operation < cannot accept the arguments: , [ 0 ], [348 347 ]". Could someone help me up, please?

Arduino code :

#include <SoftwareSerial.h>
SoftwareSerial BTserial(2, 3); // RX | TX

int sensorPin = A5;
int sensorValue = 0;
void setup() {
BTserial.begin(9600);
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(sensorPin);
BTserial.println(sensorValue);
delay(1000);
}

The variable soglia expects a value, for example: 389, but receives something that looks like a list, [0], [348 347]

Try with String, here examples:

Examples in Spanish:
http://kio4.com/appinventor/9B_bluetooth_arduino_basico.htm

I saw your links, thank you very much, but why do I write one value at a time on the serial and instead appinventor inserts it like a list?

Error is

Receive Text numberOfBytes = BytesAvalaible to Receive

Receive Text numberOfBytes = -1
In Design DelimiterByte must have the value 10.

thank you very much