Using another BluetoothLE Service for the same thing

Hello,
so i had a project that would use the heart rate bluetooth service to connect a microcontroller (Feather 32u4) with pulse sensor to a App.
The goal is to get the BPM to the App. We tried our hardest with the heart rate service but couldnt get it running.

Now we had some success with transmitting data with the example from Adafruit called bleuart_datamode.
Could we just change some code in the example so we dont have to type anything from the keyboard but use the analog pin to transmit the data?

This is the unchanged example code:

void loop(void)
    {
      // Check for user input
      char n, inputs[BUFSIZE+1];

      if (Serial.available())
      {
        n = Serial.readBytes(inputs, BUFSIZE);
        inputs[n] = 0;
        // Send characters to Bluefruit
        Serial.print("Sending: ");
        Serial.println(inputs);

        // Send input data to host via Bluefruit
        ble.print(inputs);
      }

      // Echo received data
      while ( ble.available() )
      {
        int c = ble.read();

        Serial.print((char)c);

        // Hex output too, helps w/debugging!
        Serial.print(" [0x");
        if (c <= 0xF) Serial.print(F("0"));
        Serial.print(c, HEX);
        Serial.print("] ");
      }
    }

I dont need to be able to recieve data, only transmit data.
Sadly i dont completly understand the example code, what do i need to change to transmit data with the analog pin?

Thanks in advance for the answers i am gonna get. I appreciate it

so i had a project that would use the heart rate bluetooth service to connect a microcontroller (Feather 32u4) with pulse sensor to a App.
The goal is to get the BPM to the App. We tried our hardest with the heart rate service but couldnt get it running.

There is an adafruit ble example "heartratemonitor" which uses the heart rate service. What problems did you have getting it to run?

What pulse sensor did you use? Can you get a BPM from the analog output of the pulse sensor?

what do i need to change to transmit data with the analog pin?

You can not transmit data with the analog pin.

Do you mean that you want to transmit raw analogRead() values from the pulse sensor, instead of the serial input of the example? Do you want to transmit numerical BPM data that you already have calculated from the sensor?