How to convert data from a Android to a float type???

Hello,

I try to fix a project. This project consist to send the accelerometer values to the Arduino Uno R3 and this via bluetooth. I have converted it into a char type and print it to the serial monitor. This was quite easy. Now I'm trying to convert it into a float type but i don't know how to do that. I have already tried different things but nothing happens like i want.

Here is the original code i used to convert it into a char type. I tried it with parseFloat or put the bytes into an array.

Please can someone help me to fix the project. I have already try it for more than two weeks and it is really desperated.

#include <SoftwareSerial.h> 

#define RxD 6 
#define TxD 7 

SoftwareSerial blueToothSerial(RxD,TxD);
void setup() { 
 Serial.begin(9600); 
 pinMode(RxD, INPUT); 
 pinMode(TxD, OUTPUT); 
 pinMode(Led,OUTPUT); 
 setupBlueToothConnection(); 
 
} 
void loop() {
  
char recvChar;

 while(1){
   
 if(blueToothSerial.available()){
   
recvChar=blueToothSerial.read(); 

 Serial.print(recvChar); 

 }
 }
} 


void setupBlueToothConnection()
{
 blueToothSerial.begin(38400); //BaudRate auf 38400 setzen
 blueToothSerial.print("\r\n+STWMOD=0\r\n"); //BluetoothShield arbeitet als Slave
 blueToothSerial.print("\r\n+STNA=SeeedBTSlave\r\n"); //BluetoothName für das Pairing "SeeedBTSlave"
 blueToothSerial.print("\r\n+STOAUT=1\r\n"); // Erlaub einem anderen Masterdevice zum Verbinden mit dem BluetoothShield
 blueToothSerial.print("\r\n+STAUTO=0\r\n"); // Automatischeverbindung darf nicht geschehen 
 delay(2000); // Pause muss dazwischen sein
 blueToothSerial.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable 
 Serial.println(""); //Text zum Serial Monitor schicken
 delay(2000); // Pause muss nach der Erzeugung drinen sein ansonsten bleibt dies in einer Schleife hängen
 blueToothSerial.flush(); //Bluetoothpulse werden gestartet
}
 while(1){

This just screams clueless. Putting an infinite loop in a function called in an infinite loop is a sure sign that you don't understand how loop() is called.

Learn how it is called, and get rid of the infinite loop.

I have converted it into a char type

It? It is a pronoun with no referent.

and print it to the serial monitor.

But, you didn't store it in a char array, so you have nothing to convert to a float.

I have already try it for more than two weeks and it is really desperated.

When is our homework (over)due?

What does the accelerometer send - I presume you have a specification somewhere - can you share it with us?

A float value can't be contained in a single char, so there must be other data.

...R