Bluetooth arduino AppInventor

Hi,
I have made a simple app to test my groove bluetooth shield v3.0
On one side in appinventor i have six buttons which can send a number (1,2,3,4,5,6)
on the other side a simple programm on arduino to receive the number and turn on or off an output :

#include <SoftwareSerial.h>

SoftwareSerial donnee(8,9);
int a = 0 ;


void setup()
{
  donnee.begin(9600);
Serial.begin(9600);
 a = 0 ;

}

void loop()
{
  if ( donnee.available() )
  {Serial.println();
    a = donnee.read() ;
    switch (a) 
    { case 1 : digitalWrite(3,HIGH);break;
    case 2 : digitalWrite(4,HIGH);break;
    case 3 : digitalWrite(5,HIGH);break;
    case 4 : digitalWrite(3,LOW);break;
    case 5 : digitalWrite(4,LOW);break;
    case 6 : digitalWrite(5,LOW);break;
  }}

}

attach the app code
the conection is working (on the shield the small del is green and on the smartphone the connection is working)
but no command are received by the arduino

Why not use a Bluetooth terminal app from the Google Play store?

That's what I used when I was trying my HC-05 Bluetooth modue.

I want to build a kind of robotic command so i have to understand the functionality to build my specific app

dim22:
I want to build a kind of robotic command so i have to understand the functionality to build my specific app

You have 2 unknowns.
Figure out which one you want to fix.

OK,
What i want to do is controlling the 3 servomotors of a robotic arm with a smartphone connected by bluetooth
The attachment descripte APP INVENTOR design and blocks
this the final code :

#include <SoftwareSerial.h>
#include <Servo.h>
SoftwareSerial donne(8, 9);
int w = 5 ;int i = 90 ;int j = 90 ;
Servo servo1;
Servo servo2;
Servo servo3;


void setup()
{
  donne.begin(9600);
  Serial.begin(9600);
  servo1.attach(3);
  servo2.attach(4);
  servo3.attach(5);

}

void loop() {
  if (donne.available()) {
    w = donne.read();
    Serial.println(w);
    switch (w) {
        case 1:  j=j+10;servo1.write(j); delay(500);break;
        case 2:  j=j-10;servo1.write(j); delay(500);break;
        case 3:  j=j+10;servo2.write(i); delay(500);break;
        case 4:  j=j-10;servo3.write(i); delay(500);break;
        case 5:  servo3.write(0); delay(500);break;
        case 6:  servo3.write(180); delay(500);break;
    }
    
  }
}

connection bluetooth ok
informations send when i click on any of the buttons : 254 ??? (i see it on the monitor :Serial.println(w);)

oups
i made a mistake the code is :

#include <SoftwareSerial.h>
#include <Servo.h>
SoftwareSerial donne(8, 9);
int w = 5 ;int i = 90 ;int j = 90 ;
Servo servo1;
Servo servo2;
Servo servo3;


void setup()
{
  donne.begin(9600);
  Serial.begin(9600);
  servo1.attach(3);
  servo2.attach(4);
  servo3.attach(5);

}

void loop() {
  if (donne.available()) {
    w = donne.read();
    Serial.println(w);
    switch (w) {
        case 1:  j=j+10;servo1.write(j); delay(500);break;
        case 2:  j=j-10;servo1.write(j); delay(500);break;
        case 3:  i=i+10;servo2.write(i); delay(500);break;
        case 4:  i=i-10;servo3.write(i); delay(500);break;
        case 5:  servo3.write(0); delay(500);break;
        case 6:  servo3.write(180); delay(500);break;
    }
    
  }
}