Bluetooth HC-06. Arduino. Send. Receive. Send text file. Multitouch. Image

7.- App gets the value of two potentiometers.

p9A0i_bluetooth_potenciometro.aia (3.3 KB)

// Juan A. Villalpando
// http://kio4.com/appinventor/9A0_Resumen_Bluetooth.htm

int value_pot0;
int value_pot1;
String value;


void setup() { 
  Serial.begin(9600);
}

void loop() { 
    value_pot0 = analogRead(A0);
    value_pot1 = analogRead(A1);
    value = (String) value_pot0 + "," + (String) value_pot1;
    Serial.println(value);
    delay(200); // It should be slower than the Clock Interval.
} 
  • Values from 0 to 1023.
5 Likes