Adding a XOR checksum to a Hall Effect voltage reading

have a look at this (not tested)

char msg[24];

void setup() 
{
  Serial.begin(9600);
}

void loop() 
{
  //turn pin 9 on to full power and wait to settle
  analogWrite(9, 255);
  delay(5);

  // make measurement and convert 
  int voltage = analogRead(A5) * (5.0 / 10.23) ;

  // format the message  - %d  formats an int
  sprintf(msg, "V; RB0%d;", voltage);  

  // switch off the thing
  analogWrite(9, 0);

  Serial.print(msg);

  int xor = calcChecksum(msg);
  Serial.println(xor);
  
  delay(1000);
}

int calcChecksum(char *str)
{
   int chksum = 0;
   for (int i=0; i< len(str); i++) chksum = chksum ^str[i];
   return chksum;
}