Convert INT to Array of Strings
toCharArray is a method. It will copy the value from SensorValur to charBuff, it won't return the char array.

Line:

 char msg[7] = sensorValue.toCharArray(charBuf, 7);


Should be:

 sensorValue.toCharArray(charBuf, 7);


charBuf will already have the sensorValue copied.

Check more about "toCharArray" method :

https://www.arduino.cc/en/Reference/StringToCharArray