sprintf

I am creating some simple code to work with an Android APP via BT.

The APP takes 2 sensor values from the Android and displays them on screen.

I dont think I am populating my buffer correctly as it serial.prints blank.

The APP also send commands back t the Android to turn items on/off. This part works well.

void setup() {
  Serial.begin(9600);
  Serial1.begin(9600);
  pinMode(3, OUTPUT);

}
char buffer {10};
int state;
int val = 723;
int val1 = 222;

void loop()
{
sprintf(buffer,"%d,%d",val,val1);
Serial1.println (buffer);
Serial.println (buffer);
delay (40);

  if (Serial1.available() > 0)
  {

    state = Serial1.read();

    Serial.println (state, HEX);
  }

  if (state == '0')

  {
    digitalWrite(3, LOW);
  }

  if (state == '3')
  {
    digitalWrite(3, HIGH);
  }

  if (state == '1')
  {
    digitalWrite(3, HIGH);
    delay (1000);
    digitalWrite(3, LOW);
    delay (1000);
  }
}

code tags corrected

I'm not sure what this line actually does:

char buffer {10};

But I suspect that you intended to use square brackets there.

You used braces instead of brackets when declaring buffer.
Braces are used to initialize a variable, a slightly more modern version of the = operator that was introduces in C++.

char buffer {10}; //declares a char variable named buffer and initializes it to 10
char buffer = 10; //equivalent to the previous statement
char buffer [10]; //declares an array of char with 10 elements

Yes of course! Some days!!!!