Bytes to Text conversion

I am doing a project. I connected my ESP32 WROOM32 Dev Module to an app which was build in MIT APP INVENTOR through BLE. I connected a simple potentiometer to the ESP32 WROOM32 Dev Module and sent data to the app. I am receiving the output data as (48 46 48 48) which is in ASCII decimal format. I need to receive data in characters. I will provide my Arduino code and MIT Block code. Please go through it and say what are the changes should i need to change in Arduino code and MIT Block code to get the output in characters example (1.13, 2.54, 3.30).

#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>

BLEServer* pServer = NULL;
BLECharacteristic* pCharacteristic = NULL;
BLEDescriptor *pDescr;
BLE2902 *pBLE2902;

bool deviceConnected = false;
bool oldDeviceConnected = false;
uint32_t value = 0;

// See the following for generating UUIDs:

#define SERVICE_UUID    "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"

class MyServerCallbacks: public BLEServerCallbacks {
  void onConnect(BLEServer* pServer) {
   deviceConnected = true;

  void onDisconnect(BLEServer* pServer) {
   deviceConnected = false;

void setup() {

 // Create the BLE Device

 // Create the BLE Server
 pServer = BLEDevice::createServer();
 pServer->setCallbacks(new MyServerCallbacks());

 // Create the BLE Service
 BLEService *pService = pServer->createService(SERVICE_UUID);

 // Create a BLE Characteristic
 pCharacteristic = pService->createCharacteristic(

 // Create a BLE Descriptor
 pDescr = new BLEDescriptor((uint16_t)0x2901);
 pDescr->setValue("A very interesting variable");
 pBLE2902 = new BLE2902();

 // Start the service

 // Start advertising
 BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
 pAdvertising->setMinPreferred(0x0); // set value to 0x00 to not advertise this parameter
 Serial.println("Waiting a client connection to notify...");

void loop() {
  // Read the voltage from pin 34 and convert it
  float voltage = analogRead(34) * 3.3 / 4095;

  // If a client is connected, notify the new voltage value
  if (deviceConnected) {
    char voltageStr[8];
    dtostrf(voltage, 1, 2, voltageStr); // Convert float to string
    delay(2000); // Send updates every 2000ms

  // Handle device disconnection
  if (!deviceConnected && oldDeviceConnected) {
    delay(500); // Give the BLE stack time to handle disconnection
    pServer->startAdvertising(); // Restart advertising
    oldDeviceConnected = deviceConnected;

  // Handle new device connection
  if (deviceConnected && !oldDeviceConnected) {
    oldDeviceConnected = deviceConnected;

Blocks are from Kodular. Please ask there.

Provided that you wanted really to ask the AI2 community, while your blocks are for Kodular, I see that you send strings from the ESP,
dtostrf(voltage, 1, 2, voltageStr); // Convert float to string
while you use RegisterForBytes.
Try to use the: