Replacing USB/Serial data transmission with NRF24L01 - radio.read problem

Hi, 5 years ago i developed and build a baseball scoreboard which is currently directly connected via USB/Serial to a PC. The data to control the scoreboard are send via a VB application i developed. Now i wanted to upgrade the project and replace the USB/Serial connection with radio transmission. (two Arduinos each with a NRF24L01+ module). I thought that i can "simply" replace the Serial commands with the Radio commands but here i do face an issue with the radio.read function at the Receiver which i am not able to wrap my head around after several days of unsuccessful testing.

To make it easier i am using the following simple sketch on the Transmitter side which emulates just a couple of commands usually the VB application would send.

Transmitter

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00001";
void setup() {
  radio.begin();
  radio.setChannel(55);
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
}
void loop() {
  const char text[] = "<P005ON>";
  radio.write(&text, sizeof(text));
  delay(1000);
  const char text1[] = "<P005OF>";
  radio.write(&text1, sizeof(text1));
  delay(1000);
    const char text2[] = "<I008>";
  radio.write(&text2, sizeof(text2));
  delay(1000);
  const char text3[] = "<I001>";
  radio.write(&text3, sizeof(text3));
  delay(1000);
}

For a better overview of the Receiver sketch i left the "old" Serial commands in the code, disabled them and marked them with //old USB Code. The new RF codes i tried to use are marked with //RF Code.
The problem is in line 128 rc = radio.read(). I tried several other variations but none of them would allow me to successfully verify the sketch.

// Associated Visual Basic Project = Pincontrol

// Version 2021 nRF24L01 (Receiver) replaces data transmission via Serial/USB (PC - VB Scoreboard App. - USB Cable - Arduino Mega - Scoreboard)
// with data transmission via Radio (PC - Arduino Uno/NRF24L01+ - Arduino Mega/NRF24L01+ - Scoreboard)
// !Attention new Arduino Mega Pin for Out 2 - 51 > 48!

#include <SPI.h>                    //RF Code Libraries
#include <nRF24L01.h>               //RF Code Libraries
#include <RF24.h>                   //RF Code Libraries
RF24 radio(7, 8); // CE, CSN        //RF Code PINS
const byte address[6] = "00001";    //RF Code Address

boolean debug = true;

// length of command is 20 chrs - if you need longer commands then increase the size of numChars
const byte numChars = 20;
char receivedChars[numChars];
boolean newData = false;
boolean feedback = true;

void setup() 
{
     pinMode(49, OUTPUT); // Ball 1
     pinMode(47, OUTPUT); // Ball 2 
     pinMode(45, OUTPUT); // Ball 3
     pinMode(53, OUTPUT); // Out 1
     pinMode(48, OUTPUT); // Out 2          //Attention - now Pin 48 because formely used Pin 51 is needed for NRF24L01
     pinMode(43, OUTPUT); // Strike 1
     pinMode(41, OUTPUT); // Strike 2
     
     pinMode(25, OUTPUT); // LatchPin ST_CP  Home Daisy Chain Shifregister 2x7 Segments
     pinMode(27, OUTPUT); // ClockPin SH_CP  Home 
     pinMode(23, OUTPUT); // DataPin DS      Home 
     
     pinMode(31, OUTPUT); // LatchPin ST_CP  Inning Shiftregister 1x8 Segments
     pinMode(33, OUTPUT); // ClockPin SH_CP  Inning
     pinMode(29, OUTPUT); // DataPin DS      Inning
     
     pinMode(37, OUTPUT); // LatchPin ST_CP  Guest Daisy Chain Shifregister 2x7 Segments
     pinMode(39, OUTPUT); // ClockPin SH_CP  Guest
     pinMode(35, OUTPUT); // DataPin DS      Guest
     
     Serial.begin(57600);
     radio.begin();                       // RF Code
     radio.setChannel(55);                // RF Cod
     radio.openReadingPipe(0, address);   // RF Cod
     radio.setPALevel(RF24_PA_MIN);       // RF Cod
     radio.startListening();              // RF Code
     
// TEST THE DISPLAY AND LIGHT ALL LEDS FOR 5 SECONDS AT EVERY PROGRAM START
  // Strikes, Outs and Balls
  digitalWrite (43, HIGH);
  digitalWrite (41, HIGH);
  digitalWrite (53, HIGH);
  digitalWrite (48, HIGH);
  digitalWrite (49, HIGH);
  digitalWrite (47, HIGH);
  digitalWrite (45, HIGH);
  // INNING DIGIT 1x 8 SEGMENT DISPLAY (A-H)Using H as 10s Digit.
  digitalWrite(31, LOW); //Latch Pin
  shiftOut(29,33,MSBFIRST,255);
  digitalWrite(31, HIGH);
  // GUEST DIGITS 2x7 DAISY CHAINED SEGMENT DISPLAYS (A-G)
  digitalWrite(37, LOW);
  shiftOut(35,39,MSBFIRST,127);
  shiftOut(35,39,MSBFIRST,127);
  digitalWrite(37, HIGH);
  // HOME DIGITS 2x7 DAISY CHAINED SEGMENT DISPLAYS (A-G)
  digitalWrite(25, LOW);
  shiftOut(23,27,MSBFIRST,127);
  shiftOut(23,27,MSBFIRST,127);
  digitalWrite(25, HIGH);

  delay (5000);
  
  digitalWrite (43, LOW);
  digitalWrite (41, LOW);
  digitalWrite (53, LOW);
  digitalWrite (48, LOW);
  digitalWrite (49, LOW);
  digitalWrite (47, LOW);
  digitalWrite (45, LOW);
  // INNING DIGIT
  digitalWrite(31, LOW);
  shiftOut(29,33,MSBFIRST,6);
  digitalWrite(31, HIGH);
  // GUEST DIGIT
  digitalWrite(37, LOW);
  shiftOut(35,39,MSBFIRST,0);
  shiftOut(35,39,MSBFIRST,63);
  digitalWrite(37, HIGH);
  // HOME DIGIT
  digitalWrite(25, LOW);
  shiftOut(23,27,MSBFIRST,0);
  shiftOut(23,27,MSBFIRST,63);
  digitalWrite(25, HIGH);

// TEST ENDE

}
void loop() 
{
//     if (Serial.available() > 0)     {  recvWithStartEndMarkers();  //old USB Code
     if (radio.available() > 0)     {  recvWithStartEndMarkers(); }   //RF Code
     if (newData) { parseData(); }
}     

/*********************
* Takes serial input and looks for data between a start and end marker.
* Global: Updates receivedChars[] with the received data
* Local:
*/ 
void recvWithStartEndMarkers() 
{
    
// function recvWithStartEndMarkers 

     static boolean recvInProgress = false;
     static byte ndx = 0;
     char startMarker = '<';
     char endMarker = '>';

     char rc;

//     if (Serial.available() > 0)  {      //old USB Code 
//        rc = Serial.read();              //old USB Code
     if (radio.available() > 0)     {      //RF Code
        rc = radio.read();                 //RF Code HERE IS THE PROBLEM: no matching function for call to 'RF24::read()'
          
          if (recvInProgress == true) 
          {
               if (rc != endMarker) 
               {
                    receivedChars[ndx] = rc;
                    ndx++;
                    if (ndx >= numChars) { ndx = numChars - 1; }
               }
               else 
               {
                     receivedChars[ndx] = '\0'; // terminate the string
                     recvInProgress = false;
                     ndx = 0;
                     newData = true;
               }
          }
          else if (rc == startMarker) { recvInProgress = true; }
     }
}

/*********************
* converts 3 ascii characters to a numeric value
* Global: Expects receivedChars[] to contain the ascii characters
* Local:  startPos is the position of the first character
*/

int convertToNumber( byte startPos) //Original mit 3 Characters
{
  unsigned int tmp = 0;
  tmp = (receivedChars[startPos]-48) * 100;
  tmp = tmp + (receivedChars[startPos+1]-48) * 10;
  tmp = tmp + receivedChars[startPos+2]-48;  
  return tmp;
}

/*********************
* Checks receivedChars[] for commands
* Global: receivedChars[] and newData;
* Local:
*/      

void parseData()
{  
        newData = false;    
        if (debug) { Serial.println( receivedChars ); }    
        
      // OUTS, STRIKES AND BALLS
        // P0xxON - "P" for VB Checkboxes, "0xx" (001 - 010) is the associated checkbox number in Pincontrol, "ON" = on
        // P0xxOF - "P" for VB Checkboxes, "0xx" (001 - 010) is the associated checkbox number in Pincontrol, "OF" = off
        if (receivedChars[0] == 'P'  )
        {
             int tmp = convertToNumber( 1 ); // (1) defining that the first value after "P" is the starter for the convertToNumber function 
             if ( receivedChars[4] == 'O' && receivedChars[5] == 'N' ) { digitalWrite(tmp,HIGH); }
             if ( receivedChars[4] == 'O' && receivedChars[5] == 'F' ) { digitalWrite(tmp,LOW);  }
        } 

      //INNING COUNTER
        // I001 - "I" for VB Inning NumericUpDown, "001", "002", ... "019" is the switch case number
        
        if (receivedChars[0] == 'I')
        { 
             int inningDisplay = convertToNumber( 1 ); //uses convertToNumber routine and converts
                                                       //out of 001 - 019 the individual switch case number 1-19.
          switch (inningDisplay){
          case 0:
          inningDisplay = 63;
          break;
          case 1: //1
          inningDisplay = 48;  
          break;
          case 2: //2
          inningDisplay = 91;
          break;
          case 3: //3
          inningDisplay = 79;
          break;
          case 4:
          inningDisplay = 102;
          break;
          case 5:
          inningDisplay = 109;
          break;
          case 6:
          inningDisplay = 125;
          break;
          case 7:
          inningDisplay = 7;
          break;
          case 8:
          inningDisplay = 127;
          break;
          case 9:
          inningDisplay = 111;
          break;
          case 10: 
          inningDisplay = 191;
          break; 
          case 11:
          inningDisplay = 134;
          break;
          case 12:
          inningDisplay = 219;
          break;  
          case 13:
          inningDisplay = 207;
          break;
          case 14:
          inningDisplay = 230;
          break;
          case 15:
          inningDisplay = 237;
          break;
          case 16:
          inningDisplay = 253;
          break;
          case 17:
          inningDisplay = 135;
          break;
          case 18:
          inningDisplay = 255;
          break;
          case 19:
          inningDisplay = 231;
          break;
          }

    digitalWrite(31, LOW);
    shiftOut(29,33,MSBFIRST,inningDisplay);  //8 bit Shiftout to Inning Counter 1x8-Segment display 
    digitalWrite(31, HIGH); 
        }

      //GUEST COUNTER
        // G001 - "G" for VB Guest NumericUpDown, "001", "002", ... "099" is the switch case number
        
        if (receivedChars[0] == 'G')
        { 
             int guestDisplay = convertToNumber( 1 ); //uses convertToNumber routine and converts
                                                      //out of "001" - "099" the individual switch case number 1-99.
             int guestDisplay1;
             int guestDisplay10;
             
          switch (guestDisplay){
          case 0:
          guestDisplay10 = 0;
          guestDisplay1 = 63;
          break;
          case 1:
          guestDisplay10 = 0;
          guestDisplay1 = 48;
          break;
          case 2: 
          guestDisplay1 = 91;
          guestDisplay10 = 0;
          break;
          case 3:
          guestDisplay1 = 79;
          guestDisplay10 = 0;
          break;
          case 4:
          guestDisplay1 = 102;
          guestDisplay10 = 0;
          break;
          case 5:
          guestDisplay1 = 109;
          guestDisplay10 = 0;
          break;
          case 6:
          guestDisplay1 = 125;
          guestDisplay10 = 0;
          break;
          case 7:
          guestDisplay1 = 7;
          guestDisplay10 = 0;
          break;
          case 8:
          guestDisplay1 = 127;
          guestDisplay10 = 0;
          break;
          case 9:
          guestDisplay1 = 111;
          guestDisplay10 = 0;
          break;
          case 10:
          guestDisplay1 = 63;
          guestDisplay10 = 48;
          break; 
          case 11:
          guestDisplay1 = 48 ;
          guestDisplay10 = 48 ;
          break;
          case 12:
          guestDisplay1 = 91 ;
          guestDisplay10 = 48 ;
          break;  
          case 13:
          guestDisplay1 = 79 ;
          guestDisplay10 = 48 ;
          break;
          case 14:
          guestDisplay1 = 102 ;
          guestDisplay10 = 48 ;
          break;
          case 15:
          guestDisplay1 = 109 ;
          guestDisplay10 = 48 ;
          break;
          case 16:
          guestDisplay1 = 125 ;
          guestDisplay10 = 48 ;
          break;
          case 17:
          guestDisplay1 = 7 ;
          guestDisplay10 = 48 ;
          break;
          case 18:
          guestDisplay1 = 127 ;
          guestDisplay10 = 48 ;
          break;
          case 19:
          guestDisplay1 = 111 ;
          guestDisplay10 = 48 ;
          break;
          case 20: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 91 ;
          break; 
          case 21:
          guestDisplay1 = 6 ;
          guestDisplay10 = 91 ;
          break;
          case 22:
          guestDisplay1 = 91 ;
          guestDisplay10 = 91 ;
          break;  
          case 23:
          guestDisplay1 = 79 ;
          guestDisplay10 = 91 ;
          break;
          case 24:
          guestDisplay1 = 102 ;
          guestDisplay10 = 91 ;
          break;
          case 25:
          guestDisplay1 = 109 ;
          guestDisplay10 = 91 ;
          break;
          case 26:
          guestDisplay1 = 125 ;
          guestDisplay10 = 91 ;
          break;
          case 27:
          guestDisplay1 = 7 ;
          guestDisplay10 = 91 ;
          break;
          case 28:
          guestDisplay1 = 127 ;
          guestDisplay10 = 91 ;
          break;
          case 29:
          guestDisplay1 = 111 ;
          guestDisplay10 = 91 ;
          break;
          case 30: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 79 ;
          break; 
          case 31:
          guestDisplay1 = 6 ;
          guestDisplay10 = 79 ;
          break;
          case 32:
          guestDisplay1 = 91 ;
          guestDisplay10 = 79 ;
          break;  
          case 33:
          guestDisplay1 = 79 ;
          guestDisplay10 = 79 ;
          break;
          case 34:
          guestDisplay1 = 102 ;
          guestDisplay10 = 79 ;
          break;
          case 35:
          guestDisplay1 = 109 ;
          guestDisplay10 = 79 ;
          break;
          case 36:
          guestDisplay1 = 125 ;
          guestDisplay10 = 79 ;
          break;
          case 37:
          guestDisplay1 = 7 ;
          guestDisplay10 = 79 ;
          break;
          case 38:
          guestDisplay1 = 127 ;
          guestDisplay10 = 79 ;
          break;
          case 39:
          guestDisplay1 = 111 ;
          guestDisplay10 = 79 ;
          break;
          case 40: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 102 ;
          break; 
          case 41:
          guestDisplay1 = 6 ;
          guestDisplay10 = 102 ;
          break;
          case 42:
          guestDisplay1 = 91 ;
          guestDisplay10 = 102 ;
          break;  
          case 43:
          guestDisplay1 = 79 ;
          guestDisplay10 = 102 ;
          break;
          case 44:
          guestDisplay1 = 102 ;
          guestDisplay10 = 102 ;
          break;
          case 45:
          guestDisplay1 = 109 ;
          guestDisplay10 = 102 ;
          break;
          case 46:
          guestDisplay1 = 125 ;
          guestDisplay10 = 102 ;
          break;
          case 47:
          guestDisplay1 = 7 ;
          guestDisplay10 = 102 ;
          break;
          case 48:
          guestDisplay1 = 127 ;
          guestDisplay10 = 102 ;
          break;
          case 49:
          guestDisplay1 = 111 ;
          guestDisplay10 = 102 ;
          break;
          case 50:
          guestDisplay1 = 63 ;
          guestDisplay10 = 109 ;
          break; 
          case 51:
          guestDisplay1 = 6 ;
          guestDisplay10 = 109 ;
          break;
          case 52:
          guestDisplay1 = 91 ;
          guestDisplay10 = 109 ;
          break;  
          case 53:
          guestDisplay1 = 79 ;
          guestDisplay10 = 109 ;
          break;
          case 54:
          guestDisplay1 = 102 ;
          guestDisplay10 = 109 ;
          break;
          case 55:
          guestDisplay1 = 109 ;
          guestDisplay10 = 109 ;
          break;
          case 56:
          guestDisplay1 = 125 ;
          guestDisplay10 = 109 ;
          break;
          case 57:
          guestDisplay1 = 7 ;
          guestDisplay10 = 109 ;
          break;
          case 58:
          guestDisplay1 = 127 ;
          guestDisplay10 = 109 ;
          break;
          case 59:
          guestDisplay1 = 111 ;
          guestDisplay10 = 109 ;
          break;
          case 60: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 125 ;
          break; 
          case 61:
          guestDisplay1 = 6 ;
          guestDisplay10 = 125 ;
          break;
          case 62:
          guestDisplay1 = 91 ;
          guestDisplay10 = 125 ;
          break;  
          case 63:
          guestDisplay1 = 79 ;
          guestDisplay10 = 125 ;
          break;
          case 64:
          guestDisplay1 = 102 ;
          guestDisplay10 = 125 ;
          break;
          case 65:
          guestDisplay1 = 109 ;
          guestDisplay10 = 125 ;
          break;
          case 66:
          guestDisplay1 = 125 ;
          guestDisplay10 = 125 ;
          break;
          case 67:
          guestDisplay1 = 7 ;
          guestDisplay10 = 125 ;
          break;
          case 68:
          guestDisplay1 = 127 ;
          guestDisplay10 = 125 ;
          break;
          case 69:
          guestDisplay1 = 111 ;
          guestDisplay10 = 125 ;
          break;
          case 70: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 7 ;
          break; 
          case 71:
          guestDisplay1 = 6 ;
          guestDisplay10 = 7 ;
          break;
          case 72:
          guestDisplay1 = 91 ;
          guestDisplay10 = 7 ;
          break;  
          case 73:
          guestDisplay1 = 79 ;
          guestDisplay10 = 7 ;
          break;
          case 74:
          guestDisplay1 = 102 ;
          guestDisplay10 = 7 ;
          break;
          case 75:
          guestDisplay1 = 109 ;
          guestDisplay10 = 7 ;
          break;
          case 76:
          guestDisplay1 = 125 ;
          guestDisplay10 = 7 ;
          break;
          case 77:
          guestDisplay1 = 7 ;
          guestDisplay10 = 7 ;
          break;
          case 78:
          guestDisplay1 = 127 ;
          guestDisplay10 = 7 ;
          break;
          case 79:
          guestDisplay1 = 111 ;
          guestDisplay10 = 7 ;
          break;
          case 80:
          guestDisplay1 = 63 ;
          guestDisplay10 = 127 ;
          break; 
          case 81:
          guestDisplay1 = 6 ;
          guestDisplay10 = 127 ;
          break;
          case 82:
          guestDisplay1 = 91 ;
          guestDisplay10 = 127 ;
          break;  
          case 83:
          guestDisplay1 = 79 ;
          guestDisplay10 = 127 ;
          break;
          case 84:
          guestDisplay1 = 102 ;
          guestDisplay10 = 127 ;
          break;
          case 85:
          guestDisplay1 = 109 ;
          guestDisplay10 = 127 ;
          break;
          case 86:
          guestDisplay1 = 125 ;
          guestDisplay10 = 127 ;
          break;
          case 87:
          guestDisplay1 = 7 ;
          guestDisplay10 = 127 ;
          break;
          case 88:
          guestDisplay1 = 127 ;
          guestDisplay10 = 127 ;
          break;
          case 89:
          guestDisplay1 = 111 ;
          guestDisplay10 = 127 ;
          break;
          case 90:
          guestDisplay1 = 63 ;
          guestDisplay10 = 111 ;
          break; 
          case 91:
          guestDisplay1 = 6 ;
          guestDisplay10 = 111 ;
          break;
          case 92:
          guestDisplay1 = 91 ;
          guestDisplay10 = 111 ;
          break;  
          case 93:
          guestDisplay1 = 79 ;
          guestDisplay10 = 111 ;
          break;
          case 94:
          guestDisplay1 = 102 ;
          guestDisplay10 = 111 ;
          break;
          case 95:
          guestDisplay1 = 109 ;
          guestDisplay10 = 111 ;
          break;
          case 96:
          guestDisplay1 = 125 ;
          guestDisplay10 = 111 ;
          break;
          case 97:
          guestDisplay1 = 7 ;
          guestDisplay10 = 111 ;
          break;
          case 98:
          guestDisplay1 = 127 ;
          guestDisplay10 = 111 ;
          break;
          case 99:
          guestDisplay1 = 111 ;
          guestDisplay10 = 111 ;
          break;
          }

    digitalWrite(37, LOW);
    shiftOut(35,39,MSBFIRST,guestDisplay10); //SHIFTOUT 16 bits to 2x7 Segment Digits
    shiftOut(35,39,MSBFIRST,guestDisplay1);  //SHIFTOUT 16 bits to 2x7 Segment Digits
    digitalWrite(37, HIGH); 
        }

      //HOME COUNTER
        // H001 - "H" for VB Home NumericUpDown, "001", "002", ... "099" is the switch case number
        
        if (receivedChars[0] == 'H')
        { 
             int homeDisplay = convertToNumber( 1 ); //uses convertToNumber routine and converts
                                                     //out of "001" - "099" the individual switch case number 1-99.
             int homeDisplay1;
             int homeDisplay10;
             
          switch (homeDisplay){
          
          case 0:
          homeDisplay1 = 63;
          homeDisplay10 = 0; 
          break;
          case 1:
          homeDisplay1 = 48;
          homeDisplay10 = 0;
          break;
          case 2: 
          homeDisplay1 = 91;
          homeDisplay10 = 0;
          break;
          case 3:
          homeDisplay1 = 79;
          homeDisplay10 = 0;
          break;
          case 4:
          homeDisplay1 = 102;
          homeDisplay10 = 0;
          break;
          case 5:
          homeDisplay1 = 109;
          homeDisplay10 = 0;
          break;
          case 6:
          homeDisplay1 = 125;
          homeDisplay10 = 0;
          break;
          case 7:
          homeDisplay1 = 7;
          homeDisplay10 = 0;
          break;
          case 8:
          homeDisplay1 = 127;
          homeDisplay10 = 0;
          break;
          case 9:
          homeDisplay1 = 111;
          homeDisplay10 = 0;
          break;
          case 10:
          homeDisplay1 = 63;
          homeDisplay10 = 48;
          break; 
          case 11:
          homeDisplay1 = 48 ;
          homeDisplay10 = 48 ;
          break;
          case 12:
          homeDisplay1 = 91 ;
          homeDisplay10 = 48 ;
          break;  
          case 13:
          homeDisplay1 = 79 ;
          homeDisplay10 = 48 ;
          break;
          case 14:
          homeDisplay1 = 102 ;
          homeDisplay10 = 48 ;
          break;
          case 15:
          homeDisplay1 = 109 ;
          homeDisplay10 = 48 ;
          break;
          case 16:
          homeDisplay1 = 125 ;
          homeDisplay10 = 48 ;
          break;
          case 17:
          homeDisplay1 = 7 ;
          homeDisplay10 = 48 ;
          break;
          case 18:
          homeDisplay1 = 127 ;
          homeDisplay10 = 48 ;
          break;
          case 19:
          homeDisplay1 = 111 ;
          homeDisplay10 = 48 ;
          break;
          case 20: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 91 ;
          break; 
          case 21:
          homeDisplay1 = 6 ;
          homeDisplay10 = 91 ;
          break;
          case 22:
          homeDisplay1 = 91 ;
          homeDisplay10 = 91 ;
          break;  
          case 23:
          homeDisplay1 = 79 ;
          homeDisplay10 = 91 ;
          break;
          case 24:
          homeDisplay1 = 102 ;
          homeDisplay10 = 91 ;
          break;
          case 25:
          homeDisplay1 = 109 ;
          homeDisplay10 = 91 ;
          break;
          case 26:
          homeDisplay1 = 125 ;
          homeDisplay10 = 91 ;
          break;
          case 27:
          homeDisplay1 = 7 ;
          homeDisplay10 = 91 ;
          break;
          case 28:
          homeDisplay1 = 127 ;
          homeDisplay10 = 91 ;
          break;
          case 29:
          homeDisplay1 = 111 ;
          homeDisplay10 = 91 ;
          break;
          case 30: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 79 ;
          break; 
          case 31:
          homeDisplay1 = 6 ;
          homeDisplay10 = 79 ;
          break;
          case 32:
          homeDisplay1 = 91 ;
          homeDisplay10 = 79 ;
          break;  
          case 33:
          homeDisplay1 = 79 ;
          homeDisplay10 = 79 ;
          break;
          case 34:
          homeDisplay1 = 102 ;
          homeDisplay10 = 79 ;
          break;
          case 35:
          homeDisplay1 = 109 ;
          homeDisplay10 = 79 ;
          break;
          case 36:
          homeDisplay1 = 125 ;
          homeDisplay10 = 79 ;
          break;
          case 37:
          homeDisplay1 = 7 ;
          homeDisplay10 = 79 ;
          break;
          case 38:
          homeDisplay1 = 127 ;
          homeDisplay10 = 79 ;
          break;
          case 39:
          homeDisplay1 = 111 ;
          homeDisplay10 = 79 ;
          break;
          case 40: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 102 ;
          break; 
          case 41:
          homeDisplay1 = 6 ;
          homeDisplay10 = 102 ;
          break;
          case 42:
          homeDisplay1 = 91 ;
          homeDisplay10 = 102 ;
          break;  
          case 43:
          homeDisplay1 = 79 ;
          homeDisplay10 = 102 ;
          break;
          case 44:
          homeDisplay1 = 102 ;
          homeDisplay10 = 102 ;
          break;
          case 45:
          homeDisplay1 = 109 ;
          homeDisplay10 = 102 ;
          break;
          case 46:
          homeDisplay1 = 125 ;
          homeDisplay10 = 102 ;
          break;
          case 47:
          homeDisplay1 = 7 ;
          homeDisplay10 = 102 ;
          break;
          case 48:
          homeDisplay1 = 127 ;
          homeDisplay10 = 102 ;
          break;
          case 49:
          homeDisplay1 = 111 ;
          homeDisplay10 = 102 ;
          break;
          case 50:
          homeDisplay1 = 63 ;
          homeDisplay10 = 109 ;
          break; 
          case 51:
          homeDisplay1 = 6 ;
          homeDisplay10 = 109 ;
          break;
          case 52:
          homeDisplay1 = 91 ;
          homeDisplay10 = 109 ;
          break;  
          case 53:
          homeDisplay1 = 79 ;
          homeDisplay10 = 109 ;
          break;
          case 54:
          homeDisplay1 = 102 ;
          homeDisplay10 = 109 ;
          break;
          case 55:
          homeDisplay1 = 109 ;
          homeDisplay10 = 109 ;
          break;
          case 56:
          homeDisplay1 = 125 ;
          homeDisplay10 = 109 ;
          break;
          case 57:
          homeDisplay1 = 7 ;
          homeDisplay10 = 109 ;
          break;
          case 58:
          homeDisplay1 = 127 ;
          homeDisplay10 = 109 ;
          break;
          case 59:
          homeDisplay1 = 111 ;
          homeDisplay10 = 109 ;
          break;
          case 60: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 125 ;
          break; 
          case 61:
          homeDisplay1 = 6 ;
          homeDisplay10 = 125 ;
          break;
          case 62:
          homeDisplay1 = 91 ;
          homeDisplay10 = 125 ;
          break;  
          case 63:
          homeDisplay1 = 79 ;
          homeDisplay10 = 125 ;
          break;
          case 64:
          homeDisplay1 = 102 ;
          homeDisplay10 = 125 ;
          break;
          case 65:
          homeDisplay1 = 109 ;
          homeDisplay10 = 125 ;
          break;
          case 66:
          homeDisplay1 = 125 ;
          homeDisplay10 = 125 ;
          break;
          case 67:
          homeDisplay1 = 7 ;
          homeDisplay10 = 125 ;
          break;
          case 68:
          homeDisplay1 = 127 ;
          homeDisplay10 = 125 ;
          break;
          case 69:
          homeDisplay1 = 111 ;
          homeDisplay10 = 125 ;
          break;
          case 70: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 7 ;
          break; 
          case 71:
          homeDisplay1 = 6 ;
          homeDisplay10 = 7 ;
          break;
          case 72:
          homeDisplay1 = 91 ;
          homeDisplay10 = 7 ;
          break;  
          case 73:
          homeDisplay1 = 79 ;
          homeDisplay10 = 7 ;
          break;
          case 74:
          homeDisplay1 = 102 ;
          homeDisplay10 = 7 ;
          break;
          case 75:
          homeDisplay1 = 109 ;
          homeDisplay10 = 7 ;
          break;
          case 76:
          homeDisplay1 = 125 ;
          homeDisplay10 = 7 ;
          break;
          case 77:
          homeDisplay1 = 7 ;
          homeDisplay10 = 7 ;
          break;
          case 78:
          homeDisplay1 = 127 ;
          homeDisplay10 = 7 ;
          break;
          case 79:
          homeDisplay1 = 111 ;
          homeDisplay10 = 7 ;
          break;
          case 80:
          homeDisplay1 = 63 ;
          homeDisplay10 = 127 ;
          break; 
          case 81:
          homeDisplay1 = 6 ;
          homeDisplay10 = 127 ;
          break;
          case 82:
          homeDisplay1 = 91 ;
          homeDisplay10 = 127 ;
          break;  
          case 83:
          homeDisplay1 = 79 ;
          homeDisplay10 = 127 ;
          break;
          case 84:
          homeDisplay1 = 102 ;
          homeDisplay10 = 127 ;
          break;
          case 85:
          homeDisplay1 = 109 ;
          homeDisplay10 = 127 ;
          break;
          case 86:
          homeDisplay1 = 125 ;
          homeDisplay10 = 127 ;
          break;
          case 87:
          homeDisplay1 = 7 ;
          homeDisplay10 = 127 ;
          break;
          case 88:
          homeDisplay1 = 127 ;
          homeDisplay10 = 127 ;
          break;
          case 89:
          homeDisplay1 = 111 ;
          homeDisplay10 = 127 ;
          break;
          case 90:
          homeDisplay1 = 63 ;
          homeDisplay10 = 111 ;
          break; 
          case 91:
          homeDisplay1 = 6 ;
          homeDisplay10 = 111 ;
          break;
          case 92:
          homeDisplay1 = 91 ;
          homeDisplay10 = 111 ;
          break;  
          case 93:
          homeDisplay1 = 79 ;
          homeDisplay10 = 111 ;
          break;
          case 94:
          homeDisplay1 = 102 ;
          homeDisplay10 = 111 ;
          break;
          case 95:
          homeDisplay1 = 109 ;
          homeDisplay10 = 111 ;
          break;
          case 96:
          homeDisplay1 = 125 ;
          homeDisplay10 = 111 ;
          break;
          case 97:
          homeDisplay1 = 7 ;
          homeDisplay10 = 111 ;
          break;
          case 98:
          homeDisplay1 = 127 ;
          homeDisplay10 = 111 ;
          break;
          case 99:
          homeDisplay1 = 111 ;
          homeDisplay10 = 111 ;
          break;
          }

    digitalWrite(25, LOW);
    shiftOut(23,27,MSBFIRST,homeDisplay10);  //SHIFTOUT 16 bits to 2x7 Segment Digits
    shiftOut(23,27,MSBFIRST,homeDisplay1);   //SHIFTOUT 16 bits to 2x7 Segment Digits
    digitalWrite(25, HIGH); 
        }
        
}

Many thanks in advance for your suggestions.

You are misusing the radio.read() function

Here is an example of how it can be used

// SimpleRx - the slave or the receiver

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

//pins - not all #defines used but here for documentation
#define CE_PIN   9
#define CSN_PIN 10
#define MOSI_PIN 11
#define MISO_PIN 12
#define SCK_PIN 13

const byte thisSlaveAddress[5] = {'R', 'x', 'A', 'A', 'A'};

RF24 radio(CE_PIN, CSN_PIN);

unsigned long dataReceived;
bool newData = false;

//===========

void setup()
{
  Serial.begin(115200);
  Serial.println("SimpleRx Starting");
  radio.begin();
  radio.setDataRate( RF24_250KBPS );
  radio.setPALevel(RF24_PA_MIN);
  radio.openReadingPipe(1, thisSlaveAddress);
  radio.startListening();
}

//=============

void loop()
{
  getData();
  showData();
}

//==============

void getData()
{
  if ( radio.available() )
  {
    radio.read( &dataReceived, sizeof(dataReceived) );
    newData = true;
  }
}

void showData()
{
  if (newData == true)
  {
    Serial.print("Data received ");
    Serial.println(dataReceived);
    newData = false;
  }
}

and to go with it, the transmitter sketch

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

//pins - not all #defines used but here for documentation
#define CE_PIN   9
#define CSN_PIN 10
#define MOSI_PIN 11
#define MISO_PIN 12
#define SCK_PIN 13

//const byte slaveAddress[5] = {'R', 'x', 'A', 'A', 'A'};
const unsigned char slaveAddress[] = {"RxAAA"};

RF24 radio(CE_PIN, CSN_PIN);

unsigned long numberToSend = 1000;

unsigned long currentMillis;
unsigned long prevMillis;
unsigned long txIntervalMillis = 1000; // send once per second

void setup()
{
  Serial.begin(115200);
  Serial.println("SimpleTx Starting");
  radio.begin();
  radio.setDataRate( RF24_250KBPS );
  radio.setRetries(3, 5); // delay, count 3, 5
  radio.setPALevel(RF24_PA_MIN);
  radio.openWritingPipe(slaveAddress);
}

void loop()
{
  currentMillis = millis();
  if (currentMillis - prevMillis >= txIntervalMillis)
  {
    send();
    prevMillis = millis();
  }
}

void send()
{
  static unsigned long txCount = 0;
  static unsigned long failureCount = 0;
  bool rslt;
  rslt = radio.write( &numberToSend, sizeof(numberToSend) );
  txCount++;
  Serial.print("Data Sent ");
  Serial.print(numberToSend);
  if (rslt)
  {
    Serial.print("  Ack received");
    numberToSend++;
  }
  else
  {
    failureCount++;
    Serial.print("  Tx failed");
  }
  report(txCount, failureCount);
}

//================

void report(unsigned long tx, unsigned long fails)
{
  Serial.print("  transmissions/failures  ");
  Serial.print(tx);
  Serial.print("/");
  Serial.println(fails);
}

The examples are adapted from those in Simple nRF24L01+ 2.4GHz transceiver demo

With a Serial\USB connection, there is a good probability that all the stuff sent is received, and normally you dont need flow control to deal with circumstances when the receiver is busy.

For RF connections, there is a distinct possibility that some of the small packets of data sent (the NRF24L01 is not a serial stream device) will be lost or currupted. So the transmitter has to know how to deal with the circumstances when a packet is nor received or has errors and needs to be resent. In addition its likley that some form of flow control is needed.

There are RF devices that have the firmaware built in for a serial bridge, the HC12 or E32 LoRa devices for instance, but even those do not have error correction stuff built in.

Have fun.

Radio just throws stuff into the air, who know where it will land. Also it has small 'packets' so you need to break you sends up.
These projects have Radio coms using sequence nos and resends at the lower levels.
Dig through the library codes to see what they do.

LoRa/Radio Long Range Garage Door Controller A point-to-point LoRa in-car remote control and garage door receiver. 128bit security and indication the door has reached the required position. The door can also be controlled from your Android mobile, via a WiFi to Radio bridge, with a visual display of the door's position

LoRa/Radio Remote Control Android Code Generator – Control from your Arduino via LoRa. No Coding Required. Includes an Android to LoRa bridge using an ESP32 (WiFi or BLE or Bluetooth)

Hi Bob, many thanks for your input. Not sure if i understand you right. I understood that radio.read is the funtion which reads the radio data, and saves them into the defined variable. Using your example sketch this would be "dataReceived"? Correct? Serial.read would do the same but reads the data from the serial interface. My challenge is to have a command which is replacing the original code line "rc = Serial.read()" with the respective radio code so that the radio data are put into "rc" which would be very important for my recvWithStartEndMarker function.


// function recvWithStartEndMarkers 

    static boolean recvInProgress = false;
    static byte ndx = 0;
    char startMarker = '<';
    char endMarker = '>';

    char rc;

//     if (Serial.available() > 0)  {      //old USB Code 
//        rc = Serial.read();              //old USB Code
    if (radio.available() > 0)     {      //RF Code
       rc = radio.read();                 //RF Code HERE IS THE PROBLEM: no matching function for call to 'RF24::read()'
         
         if (recvInProgress == true) 
         {
              if (rc != endMarker) 
              {
                   receivedChars[ndx] = rc;
                   ndx++;
                   if (ndx >= numChars) { ndx = numChars - 1; }
              }
              else 
              {
                    receivedChars[ndx] = '\0'; // terminate the string
                    recvInProgress = false;
                    ndx = 0;
                    newData = true;
              }
         }
         else if (rc == startMarker) { recvInProgress = true; }
    }
}

Hi srnet and drmpf, many thanks for making me aware about the potential packet loss and alternatives. My plan is to make the tranmission work first on my "desk" were i know that no data will get lost because i build some test scenario which just worked fine. If i am facing issues later at the baseball field i definitely will get back to your suggestions.

radio.read( &dataReceived, sizeof(dataReceived) );
Note the 2 parameters. The data type, and hence the size of the dataReceived variable determine how many bytes are read and put into the variable.

The variable could be a singe byte, an int of 2 bytes, a long of 4 bytes or even an array with anything up to 32 bytes. Compare/contrast that with Serial.read() which always reads a single byte

You could send and receive each individual byte but why would you do that when you can send up to 32 bytes at a time ?

You are already sending multiple bytes with commands such as

  const char text2[] = "<I008>";
  radio.write(&text2, sizeof(text2));

So why not receive them with
radio.read( &text2, sizeof(text2 );

Thanks for your patience and support. I used your example and defined a "char dataReceived" in line 12 and used the respective parameters in line 129 in combination woth the radio.read command. Since i still need the data from "dataReceived" in the "rc" variable i used "rc = dataReceived;" in line 130 .. is this admissible?.
I was able to compile and upload the sketch without errors. Many thanks for getting me that far. Unfortunaltey the scoreboard ignores the commands from the transmitter sketch. (I am sure the transmitter works since i used another Arduino/NRF24L01 and can see the data , P004ON, etc. correctly on the serial monitor.)

// Associated Visual Basic Project = Pincontrol

// Version 2021 nRF24L01 (Receiver) replaces data transmission via Serial/USB (PC - VB Scoreboard App. - USB Cable - Arduino Mega - Scoreboard)
// with data transmission via Radio (PC - Arduino Uno/NRF24L01+ - Arduino Mega/NRF24L01+ - Scoreboard)
// !Attention new Arduino Mega Pin for Out 2 - 51 > 48!

#include <SPI.h>                    //RF Code Libraries
#include <nRF24L01.h>               //RF Code Libraries
#include <RF24.h>                   //RF Code Libraries
RF24 radio(7, 8); // CE, CSN        //RF Code PINS
const byte address[6] = "00001";    //RF Code Address
char dataReceived[32] = "";         //RF Code UKHELIBOB Test 1

boolean debug = true;

// length of command is 20 chrs - if you need longer commands then increase the size of numChars
const byte numChars = 20;
char receivedChars[numChars];
boolean newData = false;
boolean feedback = true;

void setup() 
{
     pinMode(49, OUTPUT); // Ball 1         <P002ON> or <P002OF>
     pinMode(47, OUTPUT); // Ball 2         <P003ON> or <P003OF>
     pinMode(45, OUTPUT); // Ball 3         <P004ON> or <P004OF>
     pinMode(53, OUTPUT); // Out 1          <P005ON> or <P005OF>
     pinMode(48, OUTPUT); // Out 2          <P006ON> or <P006OF> -Attention- now Pin 48 because formely used Pin 51 is needed for NRF24L01
     pinMode(43, OUTPUT); // Strike 1       <P009ON> or <P009OF>
     pinMode(41, OUTPUT); // Strike 2       <P010ON> or <P010OF>      
     
     pinMode(25, OUTPUT); // LatchPin ST_CP  Home Daisy Chain Shifregister 2x7 Segments  <H0xx> xx = 0-99
     pinMode(27, OUTPUT); // ClockPin SH_CP  Home 
     pinMode(23, OUTPUT); // DataPin DS      Home 
     
     pinMode(31, OUTPUT); // LatchPin ST_CP  Inning Shiftregister 1x8 Segments           <I0xx> xx = 0-19
     pinMode(33, OUTPUT); // ClockPin SH_CP  Inning
     pinMode(29, OUTPUT); // DataPin DS      Inning
     
     pinMode(37, OUTPUT); // LatchPin ST_CP  Guest Daisy Chain Shifregister 2x7 Segments <G0xx> xx = 0-99
     pinMode(39, OUTPUT); // ClockPin SH_CP  Guest
     pinMode(35, OUTPUT); // DataPin DS      Guest
     
     Serial.begin(57600);
     radio.begin();                       // RF Code
     radio.setChannel(55);                // RF Code
     radio.openReadingPipe(0, address);   // RF Code
     radio.setPALevel(RF24_PA_MIN);       // RF Code
     radio.startListening();              // RF Code
     
// TEST THE DISPLAY AND LIGHT ALL LEDS FOR 5 SECONDS AT EVERY PROGRAM START
  // Strikes, Outs and Balls
  digitalWrite (43, HIGH);
  digitalWrite (41, HIGH);
  digitalWrite (53, HIGH);
  digitalWrite (48, HIGH);
  digitalWrite (49, HIGH);
  digitalWrite (47, HIGH);
  digitalWrite (45, HIGH);
  // INNING DIGIT 1x 8 SEGMENT DISPLAY (A-H)Using H as 10s Digit.
  digitalWrite(31, LOW); //Latch Pin
  shiftOut(29,33,MSBFIRST,255);
  digitalWrite(31, HIGH);
  // GUEST DIGITS 2x7 DAISY CHAINED SEGMENT DISPLAYS (A-G)
  digitalWrite(37, LOW);
  shiftOut(35,39,MSBFIRST,127);
  shiftOut(35,39,MSBFIRST,127);
  digitalWrite(37, HIGH);
  // HOME DIGITS 2x7 DAISY CHAINED SEGMENT DISPLAYS (A-G)
  digitalWrite(25, LOW);
  shiftOut(23,27,MSBFIRST,127);
  shiftOut(23,27,MSBFIRST,127);
  digitalWrite(25, HIGH);

  delay (5000);
  
  digitalWrite (43, LOW);
  digitalWrite (41, LOW);
  digitalWrite (53, LOW);
  digitalWrite (48, LOW);
  digitalWrite (49, LOW);
  digitalWrite (47, LOW);
  digitalWrite (45, LOW);
  // INNING DIGIT
  digitalWrite(31, LOW);
  shiftOut(29,33,MSBFIRST,6);
  digitalWrite(31, HIGH);
  // GUEST DIGIT
  digitalWrite(37, LOW);
  shiftOut(35,39,MSBFIRST,0);
  shiftOut(35,39,MSBFIRST,63);
  digitalWrite(37, HIGH);
  // HOME DIGIT
  digitalWrite(25, LOW);
  shiftOut(23,27,MSBFIRST,0);
  shiftOut(23,27,MSBFIRST,63);
  digitalWrite(25, HIGH);

// TEST END

}
void loop() 
{
//     if (Serial.available() > 0)     {  recvWithStartEndMarkers();  //old USB Code
     if (radio.available())     {  recvWithStartEndMarkers(); }   //RF Code
     if (newData) { parseData(); }
}     

/*********************
* Takes serial input and looks for data between a start and end marker.
* Global: Updates receivedChars[] with the received data
* Local:
*/ 
void recvWithStartEndMarkers() 
{
    
// function recvWithStartEndMarkers 

     static boolean recvInProgress = false;
     static byte ndx = 0;
     char startMarker = '<';
     char endMarker = '>';

     char rc;

//     if (Serial.available() > 0)  {      //old USB Code 
//        rc = Serial.read();              //old USB Code
     if (radio.available() > 0)     {      //RF Code
          radio.read(&dataReceived, sizeof(dataReceived));
          rc = dataReceived;               //is this transferring the data from dataReceived into rc so the recvWithStartEndMarkers function keeps working?
          if (recvInProgress == true) 
          {
               if (rc != endMarker) 
               {
                    receivedChars[ndx] = rc;
                    ndx++;
                    if (ndx >= numChars) { ndx = numChars - 1; }
               }
               else 
               {
                     receivedChars[ndx] = '\0'; // terminate the string
                     recvInProgress = false;
                     ndx = 0;
                     newData = true;
               }
          }
          else if (rc == startMarker) { recvInProgress = true; }
     }
}

/*********************
* converts 3 ascii characters to a numeric value
* Global: Expects receivedChars[] to contain the ascii characters
* Local:  startPos is the position of the first character
*/

int convertToNumber( byte startPos) //Original mit 3 Characters
{
  unsigned int tmp = 0;
  tmp = (receivedChars[startPos]-48) * 100;
  tmp = tmp + (receivedChars[startPos+1]-48) * 10;
  tmp = tmp + receivedChars[startPos+2]-48;  
  return tmp;
}

/*********************
* Checks receivedChars[] for commands
* Global: receivedChars[] and newData;
* Local:
*/      

void parseData()
{  
        newData = false;    
        if (debug) { Serial.println( receivedChars ); }    
        
      // OUTS, STRIKES AND BALLS
        // P0xxON - "P" for VB Checkboxes, "0xx" (001 - 010) is the associated checkbox number in Pincontrol, "ON" = on
        // P0xxOF - "P" for VB Checkboxes, "0xx" (001 - 010) is the associated checkbox number in Pincontrol, "OF" = off
        if (receivedChars[0] == 'P'  )
        {
             int tmp = convertToNumber( 1 ); // (1) defining that the first value after "P" is the starter for the convertToNumber function 
             if ( receivedChars[4] == 'O' && receivedChars[5] == 'N' ) { digitalWrite(tmp,HIGH); }
             if ( receivedChars[4] == 'O' && receivedChars[5] == 'F' ) { digitalWrite(tmp,LOW);  }
        } 

      //INNING COUNTER
        // I001 - "I" for VB Inning NumericUpDown, "001", "002", ... "019" is the switch case number
        
        if (receivedChars[0] == 'I')
        { 
             int inningDisplay = convertToNumber( 1 ); //uses convertToNumber routine and converts
                                                       //out of 001 - 019 the individual switch case number 1-19.
          switch (inningDisplay){
          case 0:
          inningDisplay = 63;
          break;
          case 1: //1
          inningDisplay = 48;  
          break;
          case 2: //2
          inningDisplay = 91;
          break;
          case 3: //3
          inningDisplay = 79;
          break;
          case 4:
          inningDisplay = 102;
          break;
          case 5:
          inningDisplay = 109;
          break;
          case 6:
          inningDisplay = 125;
          break;
          case 7:
          inningDisplay = 7;
          break;
          case 8:
          inningDisplay = 127;
          break;
          case 9:
          inningDisplay = 111;
          break;
          case 10: 
          inningDisplay = 191;
          break; 
          case 11:
          inningDisplay = 134;
          break;
          case 12:
          inningDisplay = 219;
          break;  
          case 13:
          inningDisplay = 207;
          break;
          case 14:
          inningDisplay = 230;
          break;
          case 15:
          inningDisplay = 237;
          break;
          case 16:
          inningDisplay = 253;
          break;
          case 17:
          inningDisplay = 135;
          break;
          case 18:
          inningDisplay = 255;
          break;
          case 19:
          inningDisplay = 231;
          break;
          }

    digitalWrite(31, LOW);
    shiftOut(29,33,MSBFIRST,inningDisplay);  //8 bit Shiftout to Inning Counter 1x8-Segment display 
    digitalWrite(31, HIGH); 
        }

      //GUEST COUNTER
        // G001 - "G" for VB Guest NumericUpDown, "001", "002", ... "099" is the switch case number
        
        if (receivedChars[0] == 'G')
        { 
             int guestDisplay = convertToNumber( 1 ); //uses convertToNumber routine and converts
                                                      //out of "001" - "099" the individual switch case number 1-99.
             int guestDisplay1;
             int guestDisplay10;
             
          switch (guestDisplay){
          case 0:
          guestDisplay10 = 0;
          guestDisplay1 = 63;
          break;
          case 1:
          guestDisplay10 = 0;
          guestDisplay1 = 48;
          break;
          case 2: 
          guestDisplay1 = 91;
          guestDisplay10 = 0;
          break;
          case 3:
          guestDisplay1 = 79;
          guestDisplay10 = 0;
          break;
          case 4:
          guestDisplay1 = 102;
          guestDisplay10 = 0;
          break;
          case 5:
          guestDisplay1 = 109;
          guestDisplay10 = 0;
          break;
          case 6:
          guestDisplay1 = 125;
          guestDisplay10 = 0;
          break;
          case 7:
          guestDisplay1 = 7;
          guestDisplay10 = 0;
          break;
          case 8:
          guestDisplay1 = 127;
          guestDisplay10 = 0;
          break;
          case 9:
          guestDisplay1 = 111;
          guestDisplay10 = 0;
          break;
          case 10:
          guestDisplay1 = 63;
          guestDisplay10 = 48;
          break; 
          case 11:
          guestDisplay1 = 48 ;
          guestDisplay10 = 48 ;
          break;
          case 12:
          guestDisplay1 = 91 ;
          guestDisplay10 = 48 ;
          break;  
          case 13:
          guestDisplay1 = 79 ;
          guestDisplay10 = 48 ;
          break;
          case 14:
          guestDisplay1 = 102 ;
          guestDisplay10 = 48 ;
          break;
          case 15:
          guestDisplay1 = 109 ;
          guestDisplay10 = 48 ;
          break;
          case 16:
          guestDisplay1 = 125 ;
          guestDisplay10 = 48 ;
          break;
          case 17:
          guestDisplay1 = 7 ;
          guestDisplay10 = 48 ;
          break;
          case 18:
          guestDisplay1 = 127 ;
          guestDisplay10 = 48 ;
          break;
          case 19:
          guestDisplay1 = 111 ;
          guestDisplay10 = 48 ;
          break;
          case 20: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 91 ;
          break; 
          case 21:
          guestDisplay1 = 6 ;
          guestDisplay10 = 91 ;
          break;
          case 22:
          guestDisplay1 = 91 ;
          guestDisplay10 = 91 ;
          break;  
          case 23:
          guestDisplay1 = 79 ;
          guestDisplay10 = 91 ;
          break;
          case 24:
          guestDisplay1 = 102 ;
          guestDisplay10 = 91 ;
          break;
          case 25:
          guestDisplay1 = 109 ;
          guestDisplay10 = 91 ;
          break;
          case 26:
          guestDisplay1 = 125 ;
          guestDisplay10 = 91 ;
          break;
          case 27:
          guestDisplay1 = 7 ;
          guestDisplay10 = 91 ;
          break;
          case 28:
          guestDisplay1 = 127 ;
          guestDisplay10 = 91 ;
          break;
          case 29:
          guestDisplay1 = 111 ;
          guestDisplay10 = 91 ;
          break;
          case 30: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 79 ;
          break; 
          case 31:
          guestDisplay1 = 6 ;
          guestDisplay10 = 79 ;
          break;
          case 32:
          guestDisplay1 = 91 ;
          guestDisplay10 = 79 ;
          break;  
          case 33:
          guestDisplay1 = 79 ;
          guestDisplay10 = 79 ;
          break;
          case 34:
          guestDisplay1 = 102 ;
          guestDisplay10 = 79 ;
          break;
          case 35:
          guestDisplay1 = 109 ;
          guestDisplay10 = 79 ;
          break;
          case 36:
          guestDisplay1 = 125 ;
          guestDisplay10 = 79 ;
          break;
          case 37:
          guestDisplay1 = 7 ;
          guestDisplay10 = 79 ;
          break;
          case 38:
          guestDisplay1 = 127 ;
          guestDisplay10 = 79 ;
          break;
          case 39:
          guestDisplay1 = 111 ;
          guestDisplay10 = 79 ;
          break;
          case 40: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 102 ;
          break; 
          case 41:
          guestDisplay1 = 6 ;
          guestDisplay10 = 102 ;
          break;
          case 42:
          guestDisplay1 = 91 ;
          guestDisplay10 = 102 ;
          break;  
          case 43:
          guestDisplay1 = 79 ;
          guestDisplay10 = 102 ;
          break;
          case 44:
          guestDisplay1 = 102 ;
          guestDisplay10 = 102 ;
          break;
          case 45:
          guestDisplay1 = 109 ;
          guestDisplay10 = 102 ;
          break;
          case 46:
          guestDisplay1 = 125 ;
          guestDisplay10 = 102 ;
          break;
          case 47:
          guestDisplay1 = 7 ;
          guestDisplay10 = 102 ;
          break;
          case 48:
          guestDisplay1 = 127 ;
          guestDisplay10 = 102 ;
          break;
          case 49:
          guestDisplay1 = 111 ;
          guestDisplay10 = 102 ;
          break;
          case 50:
          guestDisplay1 = 63 ;
          guestDisplay10 = 109 ;
          break; 
          case 51:
          guestDisplay1 = 6 ;
          guestDisplay10 = 109 ;
          break;
          case 52:
          guestDisplay1 = 91 ;
          guestDisplay10 = 109 ;
          break;  
          case 53:
          guestDisplay1 = 79 ;
          guestDisplay10 = 109 ;
          break;
          case 54:
          guestDisplay1 = 102 ;
          guestDisplay10 = 109 ;
          break;
          case 55:
          guestDisplay1 = 109 ;
          guestDisplay10 = 109 ;
          break;
          case 56:
          guestDisplay1 = 125 ;
          guestDisplay10 = 109 ;
          break;
          case 57:
          guestDisplay1 = 7 ;
          guestDisplay10 = 109 ;
          break;
          case 58:
          guestDisplay1 = 127 ;
          guestDisplay10 = 109 ;
          break;
          case 59:
          guestDisplay1 = 111 ;
          guestDisplay10 = 109 ;
          break;
          case 60: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 125 ;
          break; 
          case 61:
          guestDisplay1 = 6 ;
          guestDisplay10 = 125 ;
          break;
          case 62:
          guestDisplay1 = 91 ;
          guestDisplay10 = 125 ;
          break;  
          case 63:
          guestDisplay1 = 79 ;
          guestDisplay10 = 125 ;
          break;
          case 64:
          guestDisplay1 = 102 ;
          guestDisplay10 = 125 ;
          break;
          case 65:
          guestDisplay1 = 109 ;
          guestDisplay10 = 125 ;
          break;
          case 66:
          guestDisplay1 = 125 ;
          guestDisplay10 = 125 ;
          break;
          case 67:
          guestDisplay1 = 7 ;
          guestDisplay10 = 125 ;
          break;
          case 68:
          guestDisplay1 = 127 ;
          guestDisplay10 = 125 ;
          break;
          case 69:
          guestDisplay1 = 111 ;
          guestDisplay10 = 125 ;
          break;
          case 70: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 7 ;
          break; 
          case 71:
          guestDisplay1 = 6 ;
          guestDisplay10 = 7 ;
          break;
          case 72:
          guestDisplay1 = 91 ;
          guestDisplay10 = 7 ;
          break;  
          case 73:
          guestDisplay1 = 79 ;
          guestDisplay10 = 7 ;
          break;
          case 74:
          guestDisplay1 = 102 ;
          guestDisplay10 = 7 ;
          break;
          case 75:
          guestDisplay1 = 109 ;
          guestDisplay10 = 7 ;
          break;
          case 76:
          guestDisplay1 = 125 ;
          guestDisplay10 = 7 ;
          break;
          case 77:
          guestDisplay1 = 7 ;
          guestDisplay10 = 7 ;
          break;
          case 78:
          guestDisplay1 = 127 ;
          guestDisplay10 = 7 ;
          break;
          case 79:
          guestDisplay1 = 111 ;
          guestDisplay10 = 7 ;
          break;
          case 80:
          guestDisplay1 = 63 ;
          guestDisplay10 = 127 ;
          break; 
          case 81:
          guestDisplay1 = 6 ;
          guestDisplay10 = 127 ;
          break;
          case 82:
          guestDisplay1 = 91 ;
          guestDisplay10 = 127 ;
          break;  
          case 83:
          guestDisplay1 = 79 ;
          guestDisplay10 = 127 ;
          break;
          case 84:
          guestDisplay1 = 102 ;
          guestDisplay10 = 127 ;
          break;
          case 85:
          guestDisplay1 = 109 ;
          guestDisplay10 = 127 ;
          break;
          case 86:
          guestDisplay1 = 125 ;
          guestDisplay10 = 127 ;
          break;
          case 87:
          guestDisplay1 = 7 ;
          guestDisplay10 = 127 ;
          break;
          case 88:
          guestDisplay1 = 127 ;
          guestDisplay10 = 127 ;
          break;
          case 89:
          guestDisplay1 = 111 ;
          guestDisplay10 = 127 ;
          break;
          case 90:
          guestDisplay1 = 63 ;
          guestDisplay10 = 111 ;
          break; 
          case 91:
          guestDisplay1 = 6 ;
          guestDisplay10 = 111 ;
          break;
          case 92:
          guestDisplay1 = 91 ;
          guestDisplay10 = 111 ;
          break;  
          case 93:
          guestDisplay1 = 79 ;
          guestDisplay10 = 111 ;
          break;
          case 94:
          guestDisplay1 = 102 ;
          guestDisplay10 = 111 ;
          break;
          case 95:
          guestDisplay1 = 109 ;
          guestDisplay10 = 111 ;
          break;
          case 96:
          guestDisplay1 = 125 ;
          guestDisplay10 = 111 ;
          break;
          case 97:
          guestDisplay1 = 7 ;
          guestDisplay10 = 111 ;
          break;
          case 98:
          guestDisplay1 = 127 ;
          guestDisplay10 = 111 ;
          break;
          case 99:
          guestDisplay1 = 111 ;
          guestDisplay10 = 111 ;
          break;
          }

    digitalWrite(37, LOW);
    shiftOut(35,39,MSBFIRST,guestDisplay10); //SHIFTOUT 16 bits to 2x7 Segment Digits
    shiftOut(35,39,MSBFIRST,guestDisplay1);  //SHIFTOUT 16 bits to 2x7 Segment Digits
    digitalWrite(37, HIGH); 
        }

      //HOME COUNTER
        // H001 - "H" for VB Home NumericUpDown, "001", "002", ... "099" is the switch case number
        
        if (receivedChars[0] == 'H')
        { 
             int homeDisplay = convertToNumber( 1 ); //uses convertToNumber routine and converts
                                                     //out of "001" - "099" the individual switch case number 1-99.
             int homeDisplay1;
             int homeDisplay10;
             
          switch (homeDisplay){
          
          case 0:
          homeDisplay1 = 63;
          homeDisplay10 = 0; 
          break;
          case 1:
          homeDisplay1 = 48;
          homeDisplay10 = 0;
          break;
          case 2: 
          homeDisplay1 = 91;
          homeDisplay10 = 0;
          break;
          case 3:
          homeDisplay1 = 79;
          homeDisplay10 = 0;
          break;
          case 4:
          homeDisplay1 = 102;
          homeDisplay10 = 0;
          break;
          case 5:
          homeDisplay1 = 109;
          homeDisplay10 = 0;
          break;
          case 6:
          homeDisplay1 = 125;
          homeDisplay10 = 0;
          break;
          case 7:
          homeDisplay1 = 7;
          homeDisplay10 = 0;
          break;
          case 8:
          homeDisplay1 = 127;
          homeDisplay10 = 0;
          break;
          case 9:
          homeDisplay1 = 111;
          homeDisplay10 = 0;
          break;
          case 10:
          homeDisplay1 = 63;
          homeDisplay10 = 48;
          break; 
          case 11:
          homeDisplay1 = 48 ;
          homeDisplay10 = 48 ;
          break;
          case 12:
          homeDisplay1 = 91 ;
          homeDisplay10 = 48 ;
          break;  
          case 13:
          homeDisplay1 = 79 ;
          homeDisplay10 = 48 ;
          break;
          case 14:
          homeDisplay1 = 102 ;
          homeDisplay10 = 48 ;
          break;
          case 15:
          homeDisplay1 = 109 ;
          homeDisplay10 = 48 ;
          break;
          case 16:
          homeDisplay1 = 125 ;
          homeDisplay10 = 48 ;
          break;
          case 17:
          homeDisplay1 = 7 ;
          homeDisplay10 = 48 ;
          break;
          case 18:
          homeDisplay1 = 127 ;
          homeDisplay10 = 48 ;
          break;
          case 19:
          homeDisplay1 = 111 ;
          homeDisplay10 = 48 ;
          break;
          case 20: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 91 ;
          break; 
          case 21:
          homeDisplay1 = 6 ;
          homeDisplay10 = 91 ;
          break;
          case 22:
          homeDisplay1 = 91 ;
          homeDisplay10 = 91 ;
          break;  
          case 23:
          homeDisplay1 = 79 ;
          homeDisplay10 = 91 ;
          break;
          case 24:
          homeDisplay1 = 102 ;
          homeDisplay10 = 91 ;
          break;
          case 25:
          homeDisplay1 = 109 ;
          homeDisplay10 = 91 ;
          break;
          case 26:
          homeDisplay1 = 125 ;
          homeDisplay10 = 91 ;
          break;
          case 27:
          homeDisplay1 = 7 ;
          homeDisplay10 = 91 ;
          break;
          case 28:
          homeDisplay1 = 127 ;
          homeDisplay10 = 91 ;
          break;
          case 29:
          homeDisplay1 = 111 ;
          homeDisplay10 = 91 ;
          break;
          case 30: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 79 ;
          break; 
          case 31:
          homeDisplay1 = 6 ;
          homeDisplay10 = 79 ;
          break;
          case 32:
          homeDisplay1 = 91 ;
          homeDisplay10 = 79 ;
          break;  
          case 33:
          homeDisplay1 = 79 ;
          homeDisplay10 = 79 ;
          break;
          case 34:
          homeDisplay1 = 102 ;
          homeDisplay10 = 79 ;
          break;
          case 35:
          homeDisplay1 = 109 ;
          homeDisplay10 = 79 ;
          break;
          case 36:
          homeDisplay1 = 125 ;
          homeDisplay10 = 79 ;
          break;
          case 37:
          homeDisplay1 = 7 ;
          homeDisplay10 = 79 ;
          break;
          case 38:
          homeDisplay1 = 127 ;
          homeDisplay10 = 79 ;
          break;
          case 39:
          homeDisplay1 = 111 ;
          homeDisplay10 = 79 ;
          break;
          case 40: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 102 ;
          break; 
          case 41:
          homeDisplay1 = 6 ;
          homeDisplay10 = 102 ;
          break;
          case 42:
          homeDisplay1 = 91 ;
          homeDisplay10 = 102 ;
          break;  
          case 43:
          homeDisplay1 = 79 ;
          homeDisplay10 = 102 ;
          break;
          case 44:
          homeDisplay1 = 102 ;
          homeDisplay10 = 102 ;
          break;
          case 45:
          homeDisplay1 = 109 ;
          homeDisplay10 = 102 ;
          break;
          case 46:
          homeDisplay1 = 125 ;
          homeDisplay10 = 102 ;
          break;
          case 47:
          homeDisplay1 = 7 ;
          homeDisplay10 = 102 ;
          break;
          case 48:
          homeDisplay1 = 127 ;
          homeDisplay10 = 102 ;
          break;
          case 49:
          homeDisplay1 = 111 ;
          homeDisplay10 = 102 ;
          break;
          case 50:
          homeDisplay1 = 63 ;
          homeDisplay10 = 109 ;
          break; 
          case 51:
          homeDisplay1 = 6 ;
          homeDisplay10 = 109 ;
          break;
          case 52:
          homeDisplay1 = 91 ;
          homeDisplay10 = 109 ;
          break;  
          case 53:
          homeDisplay1 = 79 ;
          homeDisplay10 = 109 ;
          break;
          case 54:
          homeDisplay1 = 102 ;
          homeDisplay10 = 109 ;
          break;
          case 55:
          homeDisplay1 = 109 ;
          homeDisplay10 = 109 ;
          break;
          case 56:
          homeDisplay1 = 125 ;
          homeDisplay10 = 109 ;
          break;
          case 57:
          homeDisplay1 = 7 ;
          homeDisplay10 = 109 ;
          break;
          case 58:
          homeDisplay1 = 127 ;
          homeDisplay10 = 109 ;
          break;
          case 59:
          homeDisplay1 = 111 ;
          homeDisplay10 = 109 ;
          break;
          case 60: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 125 ;
          break; 
          case 61:
          homeDisplay1 = 6 ;
          homeDisplay10 = 125 ;
          break;
          case 62:
          homeDisplay1 = 91 ;
          homeDisplay10 = 125 ;
          break;  
          case 63:
          homeDisplay1 = 79 ;
          homeDisplay10 = 125 ;
          break;
          case 64:
          homeDisplay1 = 102 ;
          homeDisplay10 = 125 ;
          break;
          case 65:
          homeDisplay1 = 109 ;
          homeDisplay10 = 125 ;
          break;
          case 66:
          homeDisplay1 = 125 ;
          homeDisplay10 = 125 ;
          break;
          case 67:
          homeDisplay1 = 7 ;
          homeDisplay10 = 125 ;
          break;
          case 68:
          homeDisplay1 = 127 ;
          homeDisplay10 = 125 ;
          break;
          case 69:
          homeDisplay1 = 111 ;
          homeDisplay10 = 125 ;
          break;
          case 70: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 7 ;
          break; 
          case 71:
          homeDisplay1 = 6 ;
          homeDisplay10 = 7 ;
          break;
          case 72:
          homeDisplay1 = 91 ;
          homeDisplay10 = 7 ;
          break;  
          case 73:
          homeDisplay1 = 79 ;
          homeDisplay10 = 7 ;
          break;
          case 74:
          homeDisplay1 = 102 ;
          homeDisplay10 = 7 ;
          break;
          case 75:
          homeDisplay1 = 109 ;
          homeDisplay10 = 7 ;
          break;
          case 76:
          homeDisplay1 = 125 ;
          homeDisplay10 = 7 ;
          break;
          case 77:
          homeDisplay1 = 7 ;
          homeDisplay10 = 7 ;
          break;
          case 78:
          homeDisplay1 = 127 ;
          homeDisplay10 = 7 ;
          break;
          case 79:
          homeDisplay1 = 111 ;
          homeDisplay10 = 7 ;
          break;
          case 80:
          homeDisplay1 = 63 ;
          homeDisplay10 = 127 ;
          break; 
          case 81:
          homeDisplay1 = 6 ;
          homeDisplay10 = 127 ;
          break;
          case 82:
          homeDisplay1 = 91 ;
          homeDisplay10 = 127 ;
          break;  
          case 83:
          homeDisplay1 = 79 ;
          homeDisplay10 = 127 ;
          break;
          case 84:
          homeDisplay1 = 102 ;
          homeDisplay10 = 127 ;
          break;
          case 85:
          homeDisplay1 = 109 ;
          homeDisplay10 = 127 ;
          break;
          case 86:
          homeDisplay1 = 125 ;
          homeDisplay10 = 127 ;
          break;
          case 87:
          homeDisplay1 = 7 ;
          homeDisplay10 = 127 ;
          break;
          case 88:
          homeDisplay1 = 127 ;
          homeDisplay10 = 127 ;
          break;
          case 89:
          homeDisplay1 = 111 ;
          homeDisplay10 = 127 ;
          break;
          case 90:
          homeDisplay1 = 63 ;
          homeDisplay10 = 111 ;
          break; 
          case 91:
          homeDisplay1 = 6 ;
          homeDisplay10 = 111 ;
          break;
          case 92:
          homeDisplay1 = 91 ;
          homeDisplay10 = 111 ;
          break;  
          case 93:
          homeDisplay1 = 79 ;
          homeDisplay10 = 111 ;
          break;
          case 94:
          homeDisplay1 = 102 ;
          homeDisplay10 = 111 ;
          break;
          case 95:
          homeDisplay1 = 109 ;
          homeDisplay10 = 111 ;
          break;
          case 96:
          homeDisplay1 = 125 ;
          homeDisplay10 = 111 ;
          break;
          case 97:
          homeDisplay1 = 7 ;
          homeDisplay10 = 111 ;
          break;
          case 98:
          homeDisplay1 = 127 ;
          homeDisplay10 = 111 ;
          break;
          case 99:
          homeDisplay1 = 111 ;
          homeDisplay10 = 111 ;
          break;
          }

    digitalWrite(25, LOW);
    shiftOut(23,27,MSBFIRST,homeDisplay10);  //SHIFTOUT 16 bits to 2x7 Segment Digits
    shiftOut(23,27,MSBFIRST,homeDisplay1);   //SHIFTOUT 16 bits to 2x7 Segment Digits
    digitalWrite(25, HIGH); 
        }
        
}
// END

Thanks for your patience and support. I used your example and defined a "char dataReceived" in line 12 and used the respective parameters in line 129 in combination woth the radio.read command. Since i still need the data from "dataReceived" in the "rc" variable i used "rc = dataReceived;" in line 130 .. is this admissible?.
I was able to compile and upload the sketch without errors. Many thanks for getting me that far. Unfortunaltey the scoreboard ignores the commands from the transmitter sketch. (I am sure the transmitter works since i used another Arduino/NRF24L01 and can see the data , P004ON, etc. correctly on the serial monitor.)

// Associated Visual Basic Project = Pincontrol

// Version 2021 nRF24L01 (Receiver) replaces data transmission via Serial/USB (PC - VB Scoreboard App. - USB Cable - Arduino Mega - Scoreboard)
// with data transmission via Radio (PC - Arduino Uno/NRF24L01+ - Arduino Mega/NRF24L01+ - Scoreboard)
// !Attention new Arduino Mega Pin for Out 2 - 51 > 48!

#include <SPI.h>                    //RF Code Libraries
#include <nRF24L01.h>               //RF Code Libraries
#include <RF24.h>                   //RF Code Libraries
RF24 radio(7, 8); // CE, CSN        //RF Code PINS
const byte address[6] = "00001";    //RF Code Address
char dataReceived[32] = "";         //RF Code UKHELIBOB Test 1

boolean debug = true;

// length of command is 20 chrs - if you need longer commands then increase the size of numChars
const byte numChars = 20;
char receivedChars[numChars];
boolean newData = false;
boolean feedback = true;

void setup() 
{
     pinMode(49, OUTPUT); // Ball 1         <P002ON> or <P002OF>
     pinMode(47, OUTPUT); // Ball 2         <P003ON> or <P003OF>
     pinMode(45, OUTPUT); // Ball 3         <P004ON> or <P004OF>
     pinMode(53, OUTPUT); // Out 1          <P005ON> or <P005OF>
     pinMode(48, OUTPUT); // Out 2          <P006ON> or <P006OF> -Attention- now Pin 48 because formely used Pin 51 is needed for NRF24L01
     pinMode(43, OUTPUT); // Strike 1       <P009ON> or <P009OF>
     pinMode(41, OUTPUT); // Strike 2       <P010ON> or <P010OF>      
     
     pinMode(25, OUTPUT); // LatchPin ST_CP  Home Daisy Chain Shifregister 2x7 Segments  <H0xx> xx = 0-99
     pinMode(27, OUTPUT); // ClockPin SH_CP  Home 
     pinMode(23, OUTPUT); // DataPin DS      Home 
     
     pinMode(31, OUTPUT); // LatchPin ST_CP  Inning Shiftregister 1x8 Segments           <I0xx> xx = 0-19
     pinMode(33, OUTPUT); // ClockPin SH_CP  Inning
     pinMode(29, OUTPUT); // DataPin DS      Inning
     
     pinMode(37, OUTPUT); // LatchPin ST_CP  Guest Daisy Chain Shifregister 2x7 Segments <G0xx> xx = 0-99
     pinMode(39, OUTPUT); // ClockPin SH_CP  Guest
     pinMode(35, OUTPUT); // DataPin DS      Guest
     
     Serial.begin(57600);
     radio.begin();                       // RF Code
     radio.setChannel(55);                // RF Code
     radio.openReadingPipe(0, address);   // RF Code
     radio.setPALevel(RF24_PA_MIN);       // RF Code
     radio.startListening();              // RF Code
     
// TEST THE DISPLAY AND LIGHT ALL LEDS FOR 5 SECONDS AT EVERY PROGRAM START
  // Strikes, Outs and Balls
  digitalWrite (43, HIGH);
  digitalWrite (41, HIGH);
  digitalWrite (53, HIGH);
  digitalWrite (48, HIGH);
  digitalWrite (49, HIGH);
  digitalWrite (47, HIGH);
  digitalWrite (45, HIGH);
  // INNING DIGIT 1x 8 SEGMENT DISPLAY (A-H)Using H as 10s Digit.
  digitalWrite(31, LOW); //Latch Pin
  shiftOut(29,33,MSBFIRST,255);
  digitalWrite(31, HIGH);
  // GUEST DIGITS 2x7 DAISY CHAINED SEGMENT DISPLAYS (A-G)
  digitalWrite(37, LOW);
  shiftOut(35,39,MSBFIRST,127);
  shiftOut(35,39,MSBFIRST,127);
  digitalWrite(37, HIGH);
  // HOME DIGITS 2x7 DAISY CHAINED SEGMENT DISPLAYS (A-G)
  digitalWrite(25, LOW);
  shiftOut(23,27,MSBFIRST,127);
  shiftOut(23,27,MSBFIRST,127);
  digitalWrite(25, HIGH);

  delay (5000);
  
  digitalWrite (43, LOW);
  digitalWrite (41, LOW);
  digitalWrite (53, LOW);
  digitalWrite (48, LOW);
  digitalWrite (49, LOW);
  digitalWrite (47, LOW);
  digitalWrite (45, LOW);
  // INNING DIGIT
  digitalWrite(31, LOW);
  shiftOut(29,33,MSBFIRST,6);
  digitalWrite(31, HIGH);
  // GUEST DIGIT
  digitalWrite(37, LOW);
  shiftOut(35,39,MSBFIRST,0);
  shiftOut(35,39,MSBFIRST,63);
  digitalWrite(37, HIGH);
  // HOME DIGIT
  digitalWrite(25, LOW);
  shiftOut(23,27,MSBFIRST,0);
  shiftOut(23,27,MSBFIRST,63);
  digitalWrite(25, HIGH);

// TEST END

}
void loop() 
{
//     if (Serial.available() > 0)     {  recvWithStartEndMarkers();  //old USB Code
     if (radio.available())     {  recvWithStartEndMarkers(); }   //RF Code
     if (newData) { parseData(); }
}     

/*********************
* Takes serial input and looks for data between a start and end marker.
* Global: Updates receivedChars[] with the received data
* Local:
*/ 
void recvWithStartEndMarkers() 
{
    
// function recvWithStartEndMarkers 

     static boolean recvInProgress = false;
     static byte ndx = 0;
     char startMarker = '<';
     char endMarker = '>';

     char rc;

//     if (Serial.available() > 0)  {      //old USB Code 
//        rc = Serial.read();              //old USB Code
     if (radio.available() > 0)     {      //RF Code
          radio.read(&dataReceived, sizeof(dataReceived));
          rc = dataReceived;               //is this transferring the data from dataReceived into rc so the recvWithStartEndMarkers function keeps working?
          if (recvInProgress == true) 
          {
               if (rc != endMarker) 
               {
                    receivedChars[ndx] = rc;
                    ndx++;
                    if (ndx >= numChars) { ndx = numChars - 1; }
               }
               else 
               {
                     receivedChars[ndx] = '\0'; // terminate the string
                     recvInProgress = false;
                     ndx = 0;
                     newData = true;
               }
          }
          else if (rc == startMarker) { recvInProgress = true; }
     }
}

/*********************
* converts 3 ascii characters to a numeric value
* Global: Expects receivedChars[] to contain the ascii characters
* Local:  startPos is the position of the first character
*/

int convertToNumber( byte startPos) //Original mit 3 Characters
{
  unsigned int tmp = 0;
  tmp = (receivedChars[startPos]-48) * 100;
  tmp = tmp + (receivedChars[startPos+1]-48) * 10;
  tmp = tmp + receivedChars[startPos+2]-48;  
  return tmp;
}

/*********************
* Checks receivedChars[] for commands
* Global: receivedChars[] and newData;
* Local:
*/      

void parseData()
{  
        newData = false;    
        if (debug) { Serial.println( receivedChars ); }    
        
      // OUTS, STRIKES AND BALLS
        // P0xxON - "P" for VB Checkboxes, "0xx" (001 - 010) is the associated checkbox number in Pincontrol, "ON" = on
        // P0xxOF - "P" for VB Checkboxes, "0xx" (001 - 010) is the associated checkbox number in Pincontrol, "OF" = off
        if (receivedChars[0] == 'P'  )
        {
             int tmp = convertToNumber( 1 ); // (1) defining that the first value after "P" is the starter for the convertToNumber function 
             if ( receivedChars[4] == 'O' && receivedChars[5] == 'N' ) { digitalWrite(tmp,HIGH); }
             if ( receivedChars[4] == 'O' && receivedChars[5] == 'F' ) { digitalWrite(tmp,LOW);  }
        } 

      //INNING COUNTER
        // I001 - "I" for VB Inning NumericUpDown, "001", "002", ... "019" is the switch case number
        
        if (receivedChars[0] == 'I')
        { 
             int inningDisplay = convertToNumber( 1 ); //uses convertToNumber routine and converts
                                                       //out of 001 - 019 the individual switch case number 1-19.
          switch (inningDisplay){
          case 0:
          inningDisplay = 63;
          break;
          case 1: //1
          inningDisplay = 48;  
          break;
          case 2: //2
          inningDisplay = 91;
          break;
          case 3: //3
          inningDisplay = 79;
          break;
          case 4:
          inningDisplay = 102;
          break;
          case 5:
          inningDisplay = 109;
          break;
          case 6:
          inningDisplay = 125;
          break;
          case 7:
          inningDisplay = 7;
          break;
          case 8:
          inningDisplay = 127;
          break;
          case 9:
          inningDisplay = 111;
          break;
          case 10: 
          inningDisplay = 191;
          break; 
          case 11:
          inningDisplay = 134;
          break;
          case 12:
          inningDisplay = 219;
          break;  
          case 13:
          inningDisplay = 207;
          break;
          case 14:
          inningDisplay = 230;
          break;
          case 15:
          inningDisplay = 237;
          break;
          case 16:
          inningDisplay = 253;
          break;
          case 17:
          inningDisplay = 135;
          break;
          case 18:
          inningDisplay = 255;
          break;
          case 19:
          inningDisplay = 231;
          break;
          }

    digitalWrite(31, LOW);
    shiftOut(29,33,MSBFIRST,inningDisplay);  //8 bit Shiftout to Inning Counter 1x8-Segment display 
    digitalWrite(31, HIGH); 
        }

      //GUEST COUNTER
        // G001 - "G" for VB Guest NumericUpDown, "001", "002", ... "099" is the switch case number
        
        if (receivedChars[0] == 'G')
        { 
             int guestDisplay = convertToNumber( 1 ); //uses convertToNumber routine and converts
                                                      //out of "001" - "099" the individual switch case number 1-99.
             int guestDisplay1;
             int guestDisplay10;
             
          switch (guestDisplay){
          case 0:
          guestDisplay10 = 0;
          guestDisplay1 = 63;
          break;
          case 1:
          guestDisplay10 = 0;
          guestDisplay1 = 48;
          break;
          case 2: 
          guestDisplay1 = 91;
          guestDisplay10 = 0;
          break;
          case 3:
          guestDisplay1 = 79;
          guestDisplay10 = 0;
          break;
          case 4:
          guestDisplay1 = 102;
          guestDisplay10 = 0;
          break;
          case 5:
          guestDisplay1 = 109;
          guestDisplay10 = 0;
          break;
          case 6:
          guestDisplay1 = 125;
          guestDisplay10 = 0;
          break;
          case 7:
          guestDisplay1 = 7;
          guestDisplay10 = 0;
          break;
          case 8:
          guestDisplay1 = 127;
          guestDisplay10 = 0;
          break;
          case 9:
          guestDisplay1 = 111;
          guestDisplay10 = 0;
          break;
          case 10:
          guestDisplay1 = 63;
          guestDisplay10 = 48;
          break; 
          case 11:
          guestDisplay1 = 48 ;
          guestDisplay10 = 48 ;
          break;
          case 12:
          guestDisplay1 = 91 ;
          guestDisplay10 = 48 ;
          break;  
          case 13:
          guestDisplay1 = 79 ;
          guestDisplay10 = 48 ;
          break;
          case 14:
          guestDisplay1 = 102 ;
          guestDisplay10 = 48 ;
          break;
          case 15:
          guestDisplay1 = 109 ;
          guestDisplay10 = 48 ;
          break;
          case 16:
          guestDisplay1 = 125 ;
          guestDisplay10 = 48 ;
          break;
          case 17:
          guestDisplay1 = 7 ;
          guestDisplay10 = 48 ;
          break;
          case 18:
          guestDisplay1 = 127 ;
          guestDisplay10 = 48 ;
          break;
          case 19:
          guestDisplay1 = 111 ;
          guestDisplay10 = 48 ;
          break;
          case 20: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 91 ;
          break; 
          case 21:
          guestDisplay1 = 6 ;
          guestDisplay10 = 91 ;
          break;
          case 22:
          guestDisplay1 = 91 ;
          guestDisplay10 = 91 ;
          break;  
          case 23:
          guestDisplay1 = 79 ;
          guestDisplay10 = 91 ;
          break;
          case 24:
          guestDisplay1 = 102 ;
          guestDisplay10 = 91 ;
          break;
          case 25:
          guestDisplay1 = 109 ;
          guestDisplay10 = 91 ;
          break;
          case 26:
          guestDisplay1 = 125 ;
          guestDisplay10 = 91 ;
          break;
          case 27:
          guestDisplay1 = 7 ;
          guestDisplay10 = 91 ;
          break;
          case 28:
          guestDisplay1 = 127 ;
          guestDisplay10 = 91 ;
          break;
          case 29:
          guestDisplay1 = 111 ;
          guestDisplay10 = 91 ;
          break;
          case 30: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 79 ;
          break; 
          case 31:
          guestDisplay1 = 6 ;
          guestDisplay10 = 79 ;
          break;
          case 32:
          guestDisplay1 = 91 ;
          guestDisplay10 = 79 ;
          break;  
          case 33:
          guestDisplay1 = 79 ;
          guestDisplay10 = 79 ;
          break;
          case 34:
          guestDisplay1 = 102 ;
          guestDisplay10 = 79 ;
          break;
          case 35:
          guestDisplay1 = 109 ;
          guestDisplay10 = 79 ;
          break;
          case 36:
          guestDisplay1 = 125 ;
          guestDisplay10 = 79 ;
          break;
          case 37:
          guestDisplay1 = 7 ;
          guestDisplay10 = 79 ;
          break;
          case 38:
          guestDisplay1 = 127 ;
          guestDisplay10 = 79 ;
          break;
          case 39:
          guestDisplay1 = 111 ;
          guestDisplay10 = 79 ;
          break;
          case 40: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 102 ;
          break; 
          case 41:
          guestDisplay1 = 6 ;
          guestDisplay10 = 102 ;
          break;
          case 42:
          guestDisplay1 = 91 ;
          guestDisplay10 = 102 ;
          break;  
          case 43:
          guestDisplay1 = 79 ;
          guestDisplay10 = 102 ;
          break;
          case 44:
          guestDisplay1 = 102 ;
          guestDisplay10 = 102 ;
          break;
          case 45:
          guestDisplay1 = 109 ;
          guestDisplay10 = 102 ;
          break;
          case 46:
          guestDisplay1 = 125 ;
          guestDisplay10 = 102 ;
          break;
          case 47:
          guestDisplay1 = 7 ;
          guestDisplay10 = 102 ;
          break;
          case 48:
          guestDisplay1 = 127 ;
          guestDisplay10 = 102 ;
          break;
          case 49:
          guestDisplay1 = 111 ;
          guestDisplay10 = 102 ;
          break;
          case 50:
          guestDisplay1 = 63 ;
          guestDisplay10 = 109 ;
          break; 
          case 51:
          guestDisplay1 = 6 ;
          guestDisplay10 = 109 ;
          break;
          case 52:
          guestDisplay1 = 91 ;
          guestDisplay10 = 109 ;
          break;  
          case 53:
          guestDisplay1 = 79 ;
          guestDisplay10 = 109 ;
          break;
          case 54:
          guestDisplay1 = 102 ;
          guestDisplay10 = 109 ;
          break;
          case 55:
          guestDisplay1 = 109 ;
          guestDisplay10 = 109 ;
          break;
          case 56:
          guestDisplay1 = 125 ;
          guestDisplay10 = 109 ;
          break;
          case 57:
          guestDisplay1 = 7 ;
          guestDisplay10 = 109 ;
          break;
          case 58:
          guestDisplay1 = 127 ;
          guestDisplay10 = 109 ;
          break;
          case 59:
          guestDisplay1 = 111 ;
          guestDisplay10 = 109 ;
          break;
          case 60: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 125 ;
          break; 
          case 61:
          guestDisplay1 = 6 ;
          guestDisplay10 = 125 ;
          break;
          case 62:
          guestDisplay1 = 91 ;
          guestDisplay10 = 125 ;
          break;  
          case 63:
          guestDisplay1 = 79 ;
          guestDisplay10 = 125 ;
          break;
          case 64:
          guestDisplay1 = 102 ;
          guestDisplay10 = 125 ;
          break;
          case 65:
          guestDisplay1 = 109 ;
          guestDisplay10 = 125 ;
          break;
          case 66:
          guestDisplay1 = 125 ;
          guestDisplay10 = 125 ;
          break;
          case 67:
          guestDisplay1 = 7 ;
          guestDisplay10 = 125 ;
          break;
          case 68:
          guestDisplay1 = 127 ;
          guestDisplay10 = 125 ;
          break;
          case 69:
          guestDisplay1 = 111 ;
          guestDisplay10 = 125 ;
          break;
          case 70: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 7 ;
          break; 
          case 71:
          guestDisplay1 = 6 ;
          guestDisplay10 = 7 ;
          break;
          case 72:
          guestDisplay1 = 91 ;
          guestDisplay10 = 7 ;
          break;  
          case 73:
          guestDisplay1 = 79 ;
          guestDisplay10 = 7 ;
          break;
          case 74:
          guestDisplay1 = 102 ;
          guestDisplay10 = 7 ;
          break;
          case 75:
          guestDisplay1 = 109 ;
          guestDisplay10 = 7 ;
          break;
          case 76:
          guestDisplay1 = 125 ;
          guestDisplay10 = 7 ;
          break;
          case 77:
          guestDisplay1 = 7 ;
          guestDisplay10 = 7 ;
          break;
          case 78:
          guestDisplay1 = 127 ;
          guestDisplay10 = 7 ;
          break;
          case 79:
          guestDisplay1 = 111 ;
          guestDisplay10 = 7 ;
          break;
          case 80:
          guestDisplay1 = 63 ;
          guestDisplay10 = 127 ;
          break; 
          case 81:
          guestDisplay1 = 6 ;
          guestDisplay10 = 127 ;
          break;
          case 82:
          guestDisplay1 = 91 ;
          guestDisplay10 = 127 ;
          break;  
          case 83:
          guestDisplay1 = 79 ;
          guestDisplay10 = 127 ;
          break;
          case 84:
          guestDisplay1 = 102 ;
          guestDisplay10 = 127 ;
          break;
          case 85:
          guestDisplay1 = 109 ;
          guestDisplay10 = 127 ;
          break;
          case 86:
          guestDisplay1 = 125 ;
          guestDisplay10 = 127 ;
          break;
          case 87:
          guestDisplay1 = 7 ;
          guestDisplay10 = 127 ;
          break;
          case 88:
          guestDisplay1 = 127 ;
          guestDisplay10 = 127 ;
          break;
          case 89:
          guestDisplay1 = 111 ;
          guestDisplay10 = 127 ;
          break;
          case 90:
          guestDisplay1 = 63 ;
          guestDisplay10 = 111 ;
          break; 
          case 91:
          guestDisplay1 = 6 ;
          guestDisplay10 = 111 ;
          break;
          case 92:
          guestDisplay1 = 91 ;
          guestDisplay10 = 111 ;
          break;  
          case 93:
          guestDisplay1 = 79 ;
          guestDisplay10 = 111 ;
          break;
          case 94:
          guestDisplay1 = 102 ;
          guestDisplay10 = 111 ;
          break;
          case 95:
          guestDisplay1 = 109 ;
          guestDisplay10 = 111 ;
          break;
          case 96:
          guestDisplay1 = 125 ;
          guestDisplay10 = 111 ;
          break;
          case 97:
          guestDisplay1 = 7 ;
          guestDisplay10 = 111 ;
          break;
          case 98:
          guestDisplay1 = 127 ;
          guestDisplay10 = 111 ;
          break;
          case 99:
          guestDisplay1 = 111 ;
          guestDisplay10 = 111 ;
          break;
          }

    digitalWrite(37, LOW);
    shiftOut(35,39,MSBFIRST,guestDisplay10); //SHIFTOUT 16 bits to 2x7 Segment Digits
    shiftOut(35,39,MSBFIRST,guestDisplay1);  //SHIFTOUT 16 bits to 2x7 Segment Digits
    digitalWrite(37, HIGH); 
        }

      //HOME COUNTER
        // H001 - "H" for VB Home NumericUpDown, "001", "002", ... "099" is the switch case number
        
        if (receivedChars[0] == 'H')
        { 
             int homeDisplay = convertToNumber( 1 ); //uses convertToNumber routine and converts
                                                     //out of "001" - "099" the individual switch case number 1-99.
             int homeDisplay1;
             int homeDisplay10;
             
          switch (homeDisplay){
          
          case 0:
          homeDisplay1 = 63;
          homeDisplay10 = 0; 
          break;
          case 1:
          homeDisplay1 = 48;
          homeDisplay10 = 0;
          break;
          case 2: 
          homeDisplay1 = 91;
          homeDisplay10 = 0;
          break;
          case 3:
          homeDisplay1 = 79;
          homeDisplay10 = 0;
          break;
          case 4:
          homeDisplay1 = 102;
          homeDisplay10 = 0;
          break;
          case 5:
          homeDisplay1 = 109;
          homeDisplay10 = 0;
          break;
          case 6:
          homeDisplay1 = 125;
          homeDisplay10 = 0;
          break;
          case 7:
          homeDisplay1 = 7;
          homeDisplay10 = 0;
          break;
          case 8:
          homeDisplay1 = 127;
          homeDisplay10 = 0;
          break;
          case 9:
          homeDisplay1 = 111;
          homeDisplay10 = 0;
          break;
          case 10:
          homeDisplay1 = 63;
          homeDisplay10 = 48;
          break; 
          case 11:
          homeDisplay1 = 48 ;
          homeDisplay10 = 48 ;
          break;
          case 12:
          homeDisplay1 = 91 ;
          homeDisplay10 = 48 ;
          break;  
          case 13:
          homeDisplay1 = 79 ;
          homeDisplay10 = 48 ;
          break;
          case 14:
          homeDisplay1 = 102 ;
          homeDisplay10 = 48 ;
          break;
          case 15:
          homeDisplay1 = 109 ;
          homeDisplay10 = 48 ;
          break;
          case 16:
          homeDisplay1 = 125 ;
          homeDisplay10 = 48 ;
          break;
          case 17:
          homeDisplay1 = 7 ;
          homeDisplay10 = 48 ;
          break;
          case 18:
          homeDisplay1 = 127 ;
          homeDisplay10 = 48 ;
          break;
          case 19:
          homeDisplay1 = 111 ;
          homeDisplay10 = 48 ;
          break;
          case 20: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 91 ;
          break; 
          case 21:
          homeDisplay1 = 6 ;
          homeDisplay10 = 91 ;
          break;
          case 22:
          homeDisplay1 = 91 ;
          homeDisplay10 = 91 ;
          break;  
          case 23:
          homeDisplay1 = 79 ;
          homeDisplay10 = 91 ;
          break;
          case 24:
          homeDisplay1 = 102 ;
          homeDisplay10 = 91 ;
          break;
          case 25:
          homeDisplay1 = 109 ;
          homeDisplay10 = 91 ;
          break;
          case 26:
          homeDisplay1 = 125 ;
          homeDisplay10 = 91 ;
          break;
          case 27:
          homeDisplay1 = 7 ;
          homeDisplay10 = 91 ;
          break;
          case 28:
          homeDisplay1 = 127 ;
          homeDisplay10 = 91 ;
          break;
          case 29:
          homeDisplay1 = 111 ;
          homeDisplay10 = 91 ;
          break;
          case 30: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 79 ;
          break; 
          case 31:
          homeDisplay1 = 6 ;
          homeDisplay10 = 79 ;
          break;
          case 32:
          homeDisplay1 = 91 ;
          homeDisplay10 = 79 ;
          break;  
          case 33:
          homeDisplay1 = 79 ;
          homeDisplay10 = 79 ;
          break;
          case 34:
          homeDisplay1 = 102 ;
          homeDisplay10 = 79 ;
          break;
          case 35:
          homeDisplay1 = 109 ;
          homeDisplay10 = 79 ;
          break;
          case 36:
          homeDisplay1 = 125 ;
          homeDisplay10 = 79 ;
          break;
          case 37:
          homeDisplay1 = 7 ;
          homeDisplay10 = 79 ;
          break;
          case 38:
          homeDisplay1 = 127 ;
          homeDisplay10 = 79 ;
          break;
          case 39:
          homeDisplay1 = 111 ;
          homeDisplay10 = 79 ;
          break;
          case 40: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 102 ;
          break; 
          case 41:
          homeDisplay1 = 6 ;
          homeDisplay10 = 102 ;
          break;
          case 42:
          homeDisplay1 = 91 ;
          homeDisplay10 = 102 ;
          break;  
          case 43:
          homeDisplay1 = 79 ;
          homeDisplay10 = 102 ;
          break;
          case 44:
          homeDisplay1 = 102 ;
          homeDisplay10 = 102 ;
          break;
          case 45:
          homeDisplay1 = 109 ;
          homeDisplay10 = 102 ;
          break;
          case 46:
          homeDisplay1 = 125 ;
          homeDisplay10 = 102 ;
          break;
          case 47:
          homeDisplay1 = 7 ;
          homeDisplay10 = 102 ;
          break;
          case 48:
          homeDisplay1 = 127 ;
          homeDisplay10 = 102 ;
          break;
          case 49:
          homeDisplay1 = 111 ;
          homeDisplay10 = 102 ;
          break;
          case 50:
          homeDisplay1 = 63 ;
          homeDisplay10 = 109 ;
          break; 
          case 51:
          homeDisplay1 = 6 ;
          homeDisplay10 = 109 ;
          break;
          case 52:
          homeDisplay1 = 91 ;
          homeDisplay10 = 109 ;
          break;  
          case 53:
          homeDisplay1 = 79 ;
          homeDisplay10 = 109 ;
          break;
          case 54:
          homeDisplay1 = 102 ;
          homeDisplay10 = 109 ;
          break;
          case 55:
          homeDisplay1 = 109 ;
          homeDisplay10 = 109 ;
          break;
          case 56:
          homeDisplay1 = 125 ;
          homeDisplay10 = 109 ;
          break;
          case 57:
          homeDisplay1 = 7 ;
          homeDisplay10 = 109 ;
          break;
          case 58:
          homeDisplay1 = 127 ;
          homeDisplay10 = 109 ;
          break;
          case 59:
          homeDisplay1 = 111 ;
          homeDisplay10 = 109 ;
          break;
          case 60: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 125 ;
          break; 
          case 61:
          homeDisplay1 = 6 ;
          homeDisplay10 = 125 ;
          break;
          case 62:
          homeDisplay1 = 91 ;
          homeDisplay10 = 125 ;
          break;  
          case 63:
          homeDisplay1 = 79 ;
          homeDisplay10 = 125 ;
          break;
          case 64:
          homeDisplay1 = 102 ;
          homeDisplay10 = 125 ;
          break;
          case 65:
          homeDisplay1 = 109 ;
          homeDisplay10 = 125 ;
          break;
          case 66:
          homeDisplay1 = 125 ;
          homeDisplay10 = 125 ;
          break;
          case 67:
          homeDisplay1 = 7 ;
          homeDisplay10 = 125 ;
          break;
          case 68:
          homeDisplay1 = 127 ;
          homeDisplay10 = 125 ;
          break;
          case 69:
          homeDisplay1 = 111 ;
          homeDisplay10 = 125 ;
          break;
          case 70: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 7 ;
          break; 
          case 71:
          homeDisplay1 = 6 ;
          homeDisplay10 = 7 ;
          break;
          case 72:
          homeDisplay1 = 91 ;
          homeDisplay10 = 7 ;
          break;  
          case 73:
          homeDisplay1 = 79 ;
          homeDisplay10 = 7 ;
          break;
          case 74:
          homeDisplay1 = 102 ;
          homeDisplay10 = 7 ;
          break;
          case 75:
          homeDisplay1 = 109 ;
          homeDisplay10 = 7 ;
          break;
          case 76:
          homeDisplay1 = 125 ;
          homeDisplay10 = 7 ;
          break;
          case 77:
          homeDisplay1 = 7 ;
          homeDisplay10 = 7 ;
          break;
          case 78:
          homeDisplay1 = 127 ;
          homeDisplay10 = 7 ;
          break;
          case 79:
          homeDisplay1 = 111 ;
          homeDisplay10 = 7 ;
          break;
          case 80:
          homeDisplay1 = 63 ;
          homeDisplay10 = 127 ;
          break; 
          case 81:
          homeDisplay1 = 6 ;
          homeDisplay10 = 127 ;
          break;
          case 82:
          homeDisplay1 = 91 ;
          homeDisplay10 = 127 ;
          break;  
          case 83:
          homeDisplay1 = 79 ;
          homeDisplay10 = 127 ;
          break;
          case 84:
          homeDisplay1 = 102 ;
          homeDisplay10 = 127 ;
          break;
          case 85:
          homeDisplay1 = 109 ;
          homeDisplay10 = 127 ;
          break;
          case 86:
          homeDisplay1 = 125 ;
          homeDisplay10 = 127 ;
          break;
          case 87:
          homeDisplay1 = 7 ;
          homeDisplay10 = 127 ;
          break;
          case 88:
          homeDisplay1 = 127 ;
          homeDisplay10 = 127 ;
          break;
          case 89:
          homeDisplay1 = 111 ;
          homeDisplay10 = 127 ;
          break;
          case 90:
          homeDisplay1 = 63 ;
          homeDisplay10 = 111 ;
          break; 
          case 91:
          homeDisplay1 = 6 ;
          homeDisplay10 = 111 ;
          break;
          case 92:
          homeDisplay1 = 91 ;
          homeDisplay10 = 111 ;
          break;  
          case 93:
          homeDisplay1 = 79 ;
          homeDisplay10 = 111 ;
          break;
          case 94:
          homeDisplay1 = 102 ;
          homeDisplay10 = 111 ;
          break;
          case 95:
          homeDisplay1 = 109 ;
          homeDisplay10 = 111 ;
          break;
          case 96:
          homeDisplay1 = 125 ;
          homeDisplay10 = 111 ;
          break;
          case 97:
          homeDisplay1 = 7 ;
          homeDisplay10 = 111 ;
          break;
          case 98:
          homeDisplay1 = 127 ;
          homeDisplay10 = 111 ;
          break;
          case 99:
          homeDisplay1 = 111 ;
          homeDisplay10 = 111 ;
          break;
          }

    digitalWrite(25, LOW);
    shiftOut(23,27,MSBFIRST,homeDisplay10);  //SHIFTOUT 16 bits to 2x7 Segment Digits
    shiftOut(23,27,MSBFIRST,homeDisplay1);   //SHIFTOUT 16 bits to 2x7 Segment Digits
    digitalWrite(25, HIGH); 
        }
        
}
// END

You do not need any of that (except newData = true;). The data from the radio comes in as one packet, as has been pointed out, not a series of bytes. You do not need the start or end markers either. The error detection is taken care of by the radio module as is the zero termination of the string.

You do need the

newData = true;

after the packet reception to signal that new data is available.

So the loop() and packet reception functions would look like.

void loop()
{
   //     if (Serial.available() > 0)     {  recvWithStartEndMarkers();  //old USB Code
   recvWithStartEndMarkers();
   if (newData)
   {
      parseData();
   }
}

void recvWithStartEndMarkers()
{
   if (radio.available())
   {
      radio.read(&dataReceived, sizeof(dataReceived));
      newData = true;
   }
}

The data that comes in through the radio is in the dataReceived string, not receivedChars.

1 Like

dataReceived is an array of 32 chars but rc is a single char so you cannot copy one to the other nor can you copy to or from an array like that anyway

You don't need to mess around receiving the data byte by byte as you do with Serial. radio.write() will send up to 32 characters at once and as previously noted you can receive them all at once straight into a variable.

If you really want to receive them one by one then read them straight into a char variable such as rc and process each of them individually but I would not do that

1 Like

Thanks a lot groundFungus and Bob. Both of your kind input made me going back a step and rethink my whole approach which finally led to success. I took the recvWithStartEndMarkers function and simply implemented it into the Transmitter sketch instead of dealing with it on the receiver side. At the receiver i simply pick up the data and show them at the scoreboard.
Here the final version as a reference for your great support and the community.
Transmitter:

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00001";
const byte numChars = 20;
char receivedChars[numChars];
boolean newData = false;

void setup() {
  Serial.begin(57600);
  radio.begin();
  radio.setChannel(55);
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN); 
  radio.stopListening();
}

void loop() {
  recvWithStartEndMarkers();
  sendNewData();
}

void recvWithStartEndMarkers() {
  static boolean recvInProgress = false;
  static byte ndx = 0;
  char startMarker = '<';
  char endMarker = '>';
  char rc;
 
    while (Serial.available() > 0 && newData == false) {
        rc = Serial.read();

        if (recvInProgress == true) {
            if (rc != endMarker) {
                receivedChars[ndx] = rc;
                ndx++;
                if (ndx >= numChars) {
                    ndx = numChars - 1;
                }
            }
            else {
                receivedChars[ndx] = '\0'; // terminate the string
                recvInProgress = false;
                ndx = 0;
                newData = true;
            }
        }

        else if (rc == startMarker) {
            recvInProgress = true;
        }
    }
}

void sendNewData() {
  if (newData == true) {
  radio.write(receivedChars, sizeof(receivedChars));
  newData = false;
  }
}

Receiver:


#include <SPI.h>                    //RF Code Libraries
#include <nRF24L01.h>               //RF Code Libraries
#include <RF24.h>                   //RF Code Libraries
RF24 radio(7, 8); // CE, CSN        //RF Code PINS
const byte address[6] = "00001";    //RF Code Address

boolean debug = true;
boolean newData = false;
const byte numChars = 20;
char receivedChars[numChars];

void setup() 
{
     pinMode(49, OUTPUT); // Ball 1         <P002ON> or <P002OF>
     pinMode(47, OUTPUT); // Ball 2         <P003ON> or <P003OF>
     pinMode(45, OUTPUT); // Ball 3         <P004ON> or <P004OF>
     pinMode(53, OUTPUT); // Out 1          <P005ON> or <P005OF>
     pinMode(48, OUTPUT); // Out 2          <P006ON> or <P006OF> -Attention- now Pin 48 because formely used Pin 51 is needed for NRF24L01
     pinMode(43, OUTPUT); // Strike 1       <P009ON> or <P009OF>
     pinMode(41, OUTPUT); // Strike 2       <P010ON> or <P010OF>      
     
     pinMode(25, OUTPUT); // LatchPin ST_CP  Home Daisy Chain Shifregister 2x7 Segments  <H0xx> xx = 0-99
     pinMode(27, OUTPUT); // ClockPin SH_CP  Home 
     pinMode(23, OUTPUT); // DataPin DS      Home 
     
     pinMode(31, OUTPUT); // LatchPin ST_CP  Inning Shiftregister 1x8 Segments           <I0xx> xx = 0-19
     pinMode(33, OUTPUT); // ClockPin SH_CP  Inning
     pinMode(29, OUTPUT); // DataPin DS      Inning
     
     pinMode(37, OUTPUT); // LatchPin ST_CP  Guest Daisy Chain Shifregister 2x7 Segments <G0xx> xx = 0-99
     pinMode(39, OUTPUT); // ClockPin SH_CP  Guest
     pinMode(35, OUTPUT); // DataPin DS      Guest
     
     Serial.begin(57600);
     radio.begin();                       // RF Code
     radio.setChannel(55);                // RF Code
     radio.openReadingPipe(0, address);   // RF Code
     radio.setPALevel(RF24_PA_MIN);       // RF Code
     radio.startListening();              // RF Code
     
// TEST THE DISPLAY AND LIGHT ALL LEDS FOR 5 SECONDS AT EVERY PROGRAM START
  // Strikes, Outs and Balls
  digitalWrite (43, HIGH);
  digitalWrite (41, HIGH);
  digitalWrite (53, HIGH);
  digitalWrite (48, HIGH);
  digitalWrite (49, HIGH);
  digitalWrite (47, HIGH);
  digitalWrite (45, HIGH);
  // INNING DIGIT 1x 8 SEGMENT DISPLAY (A-H)Using H as 10s Digit.
  digitalWrite(31, LOW); //Latch Pin
  shiftOut(29,33,MSBFIRST,255);
  digitalWrite(31, HIGH);
  // GUEST DIGITS 2x7 DAISY CHAINED SEGMENT DISPLAYS (A-G)
  digitalWrite(37, LOW);
  shiftOut(35,39,MSBFIRST,127);
  shiftOut(35,39,MSBFIRST,127);
  digitalWrite(37, HIGH);
  // HOME DIGITS 2x7 DAISY CHAINED SEGMENT DISPLAYS (A-G)
  digitalWrite(25, LOW);
  shiftOut(23,27,MSBFIRST,127);
  shiftOut(23,27,MSBFIRST,127);
  digitalWrite(25, HIGH);

  delay (5000);
  
  digitalWrite (43, LOW);
  digitalWrite (41, LOW);
  digitalWrite (53, LOW);
  digitalWrite (48, LOW);
  digitalWrite (49, LOW);
  digitalWrite (47, LOW);
  digitalWrite (45, LOW);
  // INNING DIGIT
  digitalWrite(31, LOW);
  shiftOut(29,33,MSBFIRST,6);
  digitalWrite(31, HIGH);
  // GUEST DIGIT
  digitalWrite(37, LOW);
  shiftOut(35,39,MSBFIRST,0);
  shiftOut(35,39,MSBFIRST,63);
  digitalWrite(37, HIGH);
  // HOME DIGIT
  digitalWrite(25, LOW);
  shiftOut(23,27,MSBFIRST,0);
  shiftOut(23,27,MSBFIRST,63);
  digitalWrite(25, HIGH);
// TEST END
}

void loop() {
   parseData(); 
}     

/*********************
* converts 3 ascii characters to a numeric value
* Global: Expects receivedChars[] to contain the ascii characters
* Local:  startPos is the position of the first character
*/
int convertToNumber( byte startPos) //Original mit 3 Characters
{
  unsigned int tmp = 0;
  tmp = (receivedChars[startPos]-48) * 100;
  tmp = tmp + (receivedChars[startPos+1]-48) * 10;
  tmp = tmp + receivedChars[startPos+2]-48;  
  return tmp;
}

/*********************
* Checks receivedChars[] for commands
* Global: receivedChars[] and newData;
* Local:
*/      

void parseData()
{  
        newData = false;  
        while (radio.available())  {
        radio.read(&receivedChars, sizeof(receivedChars));  
        if (debug) { Serial.println( receivedChars );   }    
        
      // OUTS, STRIKES AND BALLS
        // P0xxON - "P" for VB Checkboxes, "0xx" (001 - 010) is the associated checkbox number in Pincontrol, "ON" = on
        // P0xxOF - "P" for VB Checkboxes, "0xx" (001 - 010) is the associated checkbox number in Pincontrol, "OF" = off
        if (receivedChars[0] == 'P'  )
        {
             int tmp = convertToNumber( 1 ); // (1) defining that the first value after "P" is the starter for the convertToNumber function 
             if ( receivedChars[4] == 'O' && receivedChars[5] == 'N' ) { digitalWrite(tmp,HIGH); }
             if ( receivedChars[4] == 'O' && receivedChars[5] == 'F' ) { digitalWrite(tmp,LOW);  }
        } 

      //INNING COUNTER - I001 - "I" for VB Inning NumericUpDown, "001", "002", ... "019" triggers switch case number
        
        if (receivedChars[0] == 'I')
        { 
             int inningDisplay = convertToNumber( 1 ); // convertToNumber converts "001"-"019" into corresponding switch case number "1"-"19".

          switch (inningDisplay){
          case 0:
          inningDisplay = 63;
          break;
          case 1: //1
          inningDisplay = 48;  
          break;
          case 2: //2
          inningDisplay = 91;
          break;
          case 3: //3
          inningDisplay = 79;
          break;
          case 4:
          inningDisplay = 102;
          break;
          case 5:
          inningDisplay = 109;
          break;
          case 6:
          inningDisplay = 125;
          break;
          case 7:
          inningDisplay = 7;
          break;
          case 8:
          inningDisplay = 127;
          break;
          case 9:
          inningDisplay = 111;
          break;
          case 10: 
          inningDisplay = 191;
          break; 
          case 11:
          inningDisplay = 134;
          break;
          case 12:
          inningDisplay = 219;
          break;  
          case 13:
          inningDisplay = 207;
          break;
          case 14:
          inningDisplay = 230;
          break;
          case 15:
          inningDisplay = 237;
          break;
          case 16:
          inningDisplay = 253;
          break;
          case 17:
          inningDisplay = 135;
          break;
          case 18:
          inningDisplay = 255;
          break;
          case 19:
          inningDisplay = 231;
          break;
          }

    digitalWrite(31, LOW);
    shiftOut(29,33,MSBFIRST,inningDisplay);  //8 bit Shiftout to Inning Counter 1x8-Segment display 
    digitalWrite(31, HIGH); 
        }

      //GUEST COUNTER - G001 - "G" for VB Guest NumericUpDown, "001", "002", ... "099" triggers switch case number
        
        if (receivedChars[0] == 'G')
        { 
             int guestDisplay = convertToNumber( 1 ); //convertToNumber converts "001"-"099" into corresponding switch case number "1"-"99".
             int guestDisplay1;
             int guestDisplay10;
             
          switch (guestDisplay){
          case 0:
          guestDisplay10 = 0;
          guestDisplay1 = 63;
          break;
          case 1:
          guestDisplay10 = 0;
          guestDisplay1 = 48;
          break;
          case 2: 
          guestDisplay1 = 91;
          guestDisplay10 = 0;
          break;
          case 3:
          guestDisplay1 = 79;
          guestDisplay10 = 0;
          break;
          case 4:
          guestDisplay1 = 102;
          guestDisplay10 = 0;
          break;
          case 5:
          guestDisplay1 = 109;
          guestDisplay10 = 0;
          break;
          case 6:
          guestDisplay1 = 125;
          guestDisplay10 = 0;
          break;
          case 7:
          guestDisplay1 = 7;
          guestDisplay10 = 0;
          break;
          case 8:
          guestDisplay1 = 127;
          guestDisplay10 = 0;
          break;
          case 9:
          guestDisplay1 = 111;
          guestDisplay10 = 0;
          break;
          case 10:
          guestDisplay1 = 63;
          guestDisplay10 = 48;
          break; 
          case 11:
          guestDisplay1 = 48 ;
          guestDisplay10 = 48 ;
          break;
          case 12:
          guestDisplay1 = 91 ;
          guestDisplay10 = 48 ;
          break;  
          case 13:
          guestDisplay1 = 79 ;
          guestDisplay10 = 48 ;
          break;
          case 14:
          guestDisplay1 = 102 ;
          guestDisplay10 = 48 ;
          break;
          case 15:
          guestDisplay1 = 109 ;
          guestDisplay10 = 48 ;
          break;
          case 16:
          guestDisplay1 = 125 ;
          guestDisplay10 = 48 ;
          break;
          case 17:
          guestDisplay1 = 7 ;
          guestDisplay10 = 48 ;
          break;
          case 18:
          guestDisplay1 = 127 ;
          guestDisplay10 = 48 ;
          break;
          case 19:
          guestDisplay1 = 111 ;
          guestDisplay10 = 48 ;
          break;
          case 20: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 91 ;
          break; 
          case 21:
          guestDisplay1 = 6 ;
          guestDisplay10 = 91 ;
          break;
          case 22:
          guestDisplay1 = 91 ;
          guestDisplay10 = 91 ;
          break;  
          case 23:
          guestDisplay1 = 79 ;
          guestDisplay10 = 91 ;
          break;
          case 24:
          guestDisplay1 = 102 ;
          guestDisplay10 = 91 ;
          break;
          case 25:
          guestDisplay1 = 109 ;
          guestDisplay10 = 91 ;
          break;
          case 26:
          guestDisplay1 = 125 ;
          guestDisplay10 = 91 ;
          break;
          case 27:
          guestDisplay1 = 7 ;
          guestDisplay10 = 91 ;
          break;
          case 28:
          guestDisplay1 = 127 ;
          guestDisplay10 = 91 ;
          break;
          case 29:
          guestDisplay1 = 111 ;
          guestDisplay10 = 91 ;
          break;
          case 30: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 79 ;
          break; 
          case 31:
          guestDisplay1 = 6 ;
          guestDisplay10 = 79 ;
          break;
          case 32:
          guestDisplay1 = 91 ;
          guestDisplay10 = 79 ;
          break;  
          case 33:
          guestDisplay1 = 79 ;
          guestDisplay10 = 79 ;
          break;
          case 34:
          guestDisplay1 = 102 ;
          guestDisplay10 = 79 ;
          break;
          case 35:
          guestDisplay1 = 109 ;
          guestDisplay10 = 79 ;
          break;
          case 36:
          guestDisplay1 = 125 ;
          guestDisplay10 = 79 ;
          break;
          case 37:
          guestDisplay1 = 7 ;
          guestDisplay10 = 79 ;
          break;
          case 38:
          guestDisplay1 = 127 ;
          guestDisplay10 = 79 ;
          break;
          case 39:
          guestDisplay1 = 111 ;
          guestDisplay10 = 79 ;
          break;
          case 40: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 102 ;
          break; 
          case 41:
          guestDisplay1 = 6 ;
          guestDisplay10 = 102 ;
          break;
          case 42:
          guestDisplay1 = 91 ;
          guestDisplay10 = 102 ;
          break;  
          case 43:
          guestDisplay1 = 79 ;
          guestDisplay10 = 102 ;
          break;
          case 44:
          guestDisplay1 = 102 ;
          guestDisplay10 = 102 ;
          break;
          case 45:
          guestDisplay1 = 109 ;
          guestDisplay10 = 102 ;
          break;
          case 46:
          guestDisplay1 = 125 ;
          guestDisplay10 = 102 ;
          break;
          case 47:
          guestDisplay1 = 7 ;
          guestDisplay10 = 102 ;
          break;
          case 48:
          guestDisplay1 = 127 ;
          guestDisplay10 = 102 ;
          break;
          case 49:
          guestDisplay1 = 111 ;
          guestDisplay10 = 102 ;
          break;
          case 50:
          guestDisplay1 = 63 ;
          guestDisplay10 = 109 ;
          break; 
          case 51:
          guestDisplay1 = 6 ;
          guestDisplay10 = 109 ;
          break;
          case 52:
          guestDisplay1 = 91 ;
          guestDisplay10 = 109 ;
          break;  
          case 53:
          guestDisplay1 = 79 ;
          guestDisplay10 = 109 ;
          break;
          case 54:
          guestDisplay1 = 102 ;
          guestDisplay10 = 109 ;
          break;
          case 55:
          guestDisplay1 = 109 ;
          guestDisplay10 = 109 ;
          break;
          case 56:
          guestDisplay1 = 125 ;
          guestDisplay10 = 109 ;
          break;
          case 57:
          guestDisplay1 = 7 ;
          guestDisplay10 = 109 ;
          break;
          case 58:
          guestDisplay1 = 127 ;
          guestDisplay10 = 109 ;
          break;
          case 59:
          guestDisplay1 = 111 ;
          guestDisplay10 = 109 ;
          break;
          case 60: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 125 ;
          break; 
          case 61:
          guestDisplay1 = 6 ;
          guestDisplay10 = 125 ;
          break;
          case 62:
          guestDisplay1 = 91 ;
          guestDisplay10 = 125 ;
          break;  
          case 63:
          guestDisplay1 = 79 ;
          guestDisplay10 = 125 ;
          break;
          case 64:
          guestDisplay1 = 102 ;
          guestDisplay10 = 125 ;
          break;
          case 65:
          guestDisplay1 = 109 ;
          guestDisplay10 = 125 ;
          break;
          case 66:
          guestDisplay1 = 125 ;
          guestDisplay10 = 125 ;
          break;
          case 67:
          guestDisplay1 = 7 ;
          guestDisplay10 = 125 ;
          break;
          case 68:
          guestDisplay1 = 127 ;
          guestDisplay10 = 125 ;
          break;
          case 69:
          guestDisplay1 = 111 ;
          guestDisplay10 = 125 ;
          break;
          case 70: 
          guestDisplay1 = 63 ;
          guestDisplay10 = 7 ;
          break; 
          case 71:
          guestDisplay1 = 6 ;
          guestDisplay10 = 7 ;
          break;
          case 72:
          guestDisplay1 = 91 ;
          guestDisplay10 = 7 ;
          break;  
          case 73:
          guestDisplay1 = 79 ;
          guestDisplay10 = 7 ;
          break;
          case 74:
          guestDisplay1 = 102 ;
          guestDisplay10 = 7 ;
          break;
          case 75:
          guestDisplay1 = 109 ;
          guestDisplay10 = 7 ;
          break;
          case 76:
          guestDisplay1 = 125 ;
          guestDisplay10 = 7 ;
          break;
          case 77:
          guestDisplay1 = 7 ;
          guestDisplay10 = 7 ;
          break;
          case 78:
          guestDisplay1 = 127 ;
          guestDisplay10 = 7 ;
          break;
          case 79:
          guestDisplay1 = 111 ;
          guestDisplay10 = 7 ;
          break;
          case 80:
          guestDisplay1 = 63 ;
          guestDisplay10 = 127 ;
          break; 
          case 81:
          guestDisplay1 = 6 ;
          guestDisplay10 = 127 ;
          break;
          case 82:
          guestDisplay1 = 91 ;
          guestDisplay10 = 127 ;
          break;  
          case 83:
          guestDisplay1 = 79 ;
          guestDisplay10 = 127 ;
          break;
          case 84:
          guestDisplay1 = 102 ;
          guestDisplay10 = 127 ;
          break;
          case 85:
          guestDisplay1 = 109 ;
          guestDisplay10 = 127 ;
          break;
          case 86:
          guestDisplay1 = 125 ;
          guestDisplay10 = 127 ;
          break;
          case 87:
          guestDisplay1 = 7 ;
          guestDisplay10 = 127 ;
          break;
          case 88:
          guestDisplay1 = 127 ;
          guestDisplay10 = 127 ;
          break;
          case 89:
          guestDisplay1 = 111 ;
          guestDisplay10 = 127 ;
          break;
          case 90:
          guestDisplay1 = 63 ;
          guestDisplay10 = 111 ;
          break; 
          case 91:
          guestDisplay1 = 6 ;
          guestDisplay10 = 111 ;
          break;
          case 92:
          guestDisplay1 = 91 ;
          guestDisplay10 = 111 ;
          break;  
          case 93:
          guestDisplay1 = 79 ;
          guestDisplay10 = 111 ;
          break;
          case 94:
          guestDisplay1 = 102 ;
          guestDisplay10 = 111 ;
          break;
          case 95:
          guestDisplay1 = 109 ;
          guestDisplay10 = 111 ;
          break;
          case 96:
          guestDisplay1 = 125 ;
          guestDisplay10 = 111 ;
          break;
          case 97:
          guestDisplay1 = 7 ;
          guestDisplay10 = 111 ;
          break;
          case 98:
          guestDisplay1 = 127 ;
          guestDisplay10 = 111 ;
          break;
          case 99:
          guestDisplay1 = 111 ;
          guestDisplay10 = 111 ;
          break;
          }

    digitalWrite(37, LOW);
    shiftOut(35,39,MSBFIRST,guestDisplay10); //SHIFTOUT 16 bits to 2x7 Segment Digits
    shiftOut(35,39,MSBFIRST,guestDisplay1);  //SHIFTOUT 16 bits to 2x7 Segment Digits
    digitalWrite(37, HIGH); 
        }

      //HOME COUNTER - H001 - "H" for VB Home NumericUpDown, "001", "002", ... "099" triggers switch case number
        
        if (receivedChars[0] == 'H')
        { 
             int homeDisplay = convertToNumber( 1 ); //uses convertToNumber converts "001"-"099" into coresponsing switch case number "1"-"99".
             int homeDisplay1;
             int homeDisplay10;
             
          switch (homeDisplay){
          
          case 0:
          homeDisplay1 = 63;
          homeDisplay10 = 0; 
          break;
          case 1:
          homeDisplay1 = 48;
          homeDisplay10 = 0;
          break;
          case 2: 
          homeDisplay1 = 91;
          homeDisplay10 = 0;
          break;
          case 3:
          homeDisplay1 = 79;
          homeDisplay10 = 0;
          break;
          case 4:
          homeDisplay1 = 102;
          homeDisplay10 = 0;
          break;
          case 5:
          homeDisplay1 = 109;
          homeDisplay10 = 0;
          break;
          case 6:
          homeDisplay1 = 125;
          homeDisplay10 = 0;
          break;
          case 7:
          homeDisplay1 = 7;
          homeDisplay10 = 0;
          break;
          case 8:
          homeDisplay1 = 127;
          homeDisplay10 = 0;
          break;
          case 9:
          homeDisplay1 = 111;
          homeDisplay10 = 0;
          break;
          case 10:
          homeDisplay1 = 63;
          homeDisplay10 = 48;
          break; 
          case 11:
          homeDisplay1 = 48 ;
          homeDisplay10 = 48 ;
          break;
          case 12:
          homeDisplay1 = 91 ;
          homeDisplay10 = 48 ;
          break;  
          case 13:
          homeDisplay1 = 79 ;
          homeDisplay10 = 48 ;
          break;
          case 14:
          homeDisplay1 = 102 ;
          homeDisplay10 = 48 ;
          break;
          case 15:
          homeDisplay1 = 109 ;
          homeDisplay10 = 48 ;
          break;
          case 16:
          homeDisplay1 = 125 ;
          homeDisplay10 = 48 ;
          break;
          case 17:
          homeDisplay1 = 7 ;
          homeDisplay10 = 48 ;
          break;
          case 18:
          homeDisplay1 = 127 ;
          homeDisplay10 = 48 ;
          break;
          case 19:
          homeDisplay1 = 111 ;
          homeDisplay10 = 48 ;
          break;
          case 20: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 91 ;
          break; 
          case 21:
          homeDisplay1 = 6 ;
          homeDisplay10 = 91 ;
          break;
          case 22:
          homeDisplay1 = 91 ;
          homeDisplay10 = 91 ;
          break;  
          case 23:
          homeDisplay1 = 79 ;
          homeDisplay10 = 91 ;
          break;
          case 24:
          homeDisplay1 = 102 ;
          homeDisplay10 = 91 ;
          break;
          case 25:
          homeDisplay1 = 109 ;
          homeDisplay10 = 91 ;
          break;
          case 26:
          homeDisplay1 = 125 ;
          homeDisplay10 = 91 ;
          break;
          case 27:
          homeDisplay1 = 7 ;
          homeDisplay10 = 91 ;
          break;
          case 28:
          homeDisplay1 = 127 ;
          homeDisplay10 = 91 ;
          break;
          case 29:
          homeDisplay1 = 111 ;
          homeDisplay10 = 91 ;
          break;
          case 30: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 79 ;
          break; 
          case 31:
          homeDisplay1 = 6 ;
          homeDisplay10 = 79 ;
          break;
          case 32:
          homeDisplay1 = 91 ;
          homeDisplay10 = 79 ;
          break;  
          case 33:
          homeDisplay1 = 79 ;
          homeDisplay10 = 79 ;
          break;
          case 34:
          homeDisplay1 = 102 ;
          homeDisplay10 = 79 ;
          break;
          case 35:
          homeDisplay1 = 109 ;
          homeDisplay10 = 79 ;
          break;
          case 36:
          homeDisplay1 = 125 ;
          homeDisplay10 = 79 ;
          break;
          case 37:
          homeDisplay1 = 7 ;
          homeDisplay10 = 79 ;
          break;
          case 38:
          homeDisplay1 = 127 ;
          homeDisplay10 = 79 ;
          break;
          case 39:
          homeDisplay1 = 111 ;
          homeDisplay10 = 79 ;
          break;
          case 40: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 102 ;
          break; 
          case 41:
          homeDisplay1 = 6 ;
          homeDisplay10 = 102 ;
          break;
          case 42:
          homeDisplay1 = 91 ;
          homeDisplay10 = 102 ;
          break;  
          case 43:
          homeDisplay1 = 79 ;
          homeDisplay10 = 102 ;
          break;
          case 44:
          homeDisplay1 = 102 ;
          homeDisplay10 = 102 ;
          break;
          case 45:
          homeDisplay1 = 109 ;
          homeDisplay10 = 102 ;
          break;
          case 46:
          homeDisplay1 = 125 ;
          homeDisplay10 = 102 ;
          break;
          case 47:
          homeDisplay1 = 7 ;
          homeDisplay10 = 102 ;
          break;
          case 48:
          homeDisplay1 = 127 ;
          homeDisplay10 = 102 ;
          break;
          case 49:
          homeDisplay1 = 111 ;
          homeDisplay10 = 102 ;
          break;
          case 50:
          homeDisplay1 = 63 ;
          homeDisplay10 = 109 ;
          break; 
          case 51:
          homeDisplay1 = 6 ;
          homeDisplay10 = 109 ;
          break;
          case 52:
          homeDisplay1 = 91 ;
          homeDisplay10 = 109 ;
          break;  
          case 53:
          homeDisplay1 = 79 ;
          homeDisplay10 = 109 ;
          break;
          case 54:
          homeDisplay1 = 102 ;
          homeDisplay10 = 109 ;
          break;
          case 55:
          homeDisplay1 = 109 ;
          homeDisplay10 = 109 ;
          break;
          case 56:
          homeDisplay1 = 125 ;
          homeDisplay10 = 109 ;
          break;
          case 57:
          homeDisplay1 = 7 ;
          homeDisplay10 = 109 ;
          break;
          case 58:
          homeDisplay1 = 127 ;
          homeDisplay10 = 109 ;
          break;
          case 59:
          homeDisplay1 = 111 ;
          homeDisplay10 = 109 ;
          break;
          case 60: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 125 ;
          break; 
          case 61:
          homeDisplay1 = 6 ;
          homeDisplay10 = 125 ;
          break;
          case 62:
          homeDisplay1 = 91 ;
          homeDisplay10 = 125 ;
          break;  
          case 63:
          homeDisplay1 = 79 ;
          homeDisplay10 = 125 ;
          break;
          case 64:
          homeDisplay1 = 102 ;
          homeDisplay10 = 125 ;
          break;
          case 65:
          homeDisplay1 = 109 ;
          homeDisplay10 = 125 ;
          break;
          case 66:
          homeDisplay1 = 125 ;
          homeDisplay10 = 125 ;
          break;
          case 67:
          homeDisplay1 = 7 ;
          homeDisplay10 = 125 ;
          break;
          case 68:
          homeDisplay1 = 127 ;
          homeDisplay10 = 125 ;
          break;
          case 69:
          homeDisplay1 = 111 ;
          homeDisplay10 = 125 ;
          break;
          case 70: 
          homeDisplay1 = 63 ;
          homeDisplay10 = 7 ;
          break; 
          case 71:
          homeDisplay1 = 6 ;
          homeDisplay10 = 7 ;
          break;
          case 72:
          homeDisplay1 = 91 ;
          homeDisplay10 = 7 ;
          break;  
          case 73:
          homeDisplay1 = 79 ;
          homeDisplay10 = 7 ;
          break;
          case 74:
          homeDisplay1 = 102 ;
          homeDisplay10 = 7 ;
          break;
          case 75:
          homeDisplay1 = 109 ;
          homeDisplay10 = 7 ;
          break;
          case 76:
          homeDisplay1 = 125 ;
          homeDisplay10 = 7 ;
          break;
          case 77:
          homeDisplay1 = 7 ;
          homeDisplay10 = 7 ;
          break;
          case 78:
          homeDisplay1 = 127 ;
          homeDisplay10 = 7 ;
          break;
          case 79:
          homeDisplay1 = 111 ;
          homeDisplay10 = 7 ;
          break;
          case 80:
          homeDisplay1 = 63 ;
          homeDisplay10 = 127 ;
          break; 
          case 81:
          homeDisplay1 = 6 ;
          homeDisplay10 = 127 ;
          break;
          case 82:
          homeDisplay1 = 91 ;
          homeDisplay10 = 127 ;
          break;  
          case 83:
          homeDisplay1 = 79 ;
          homeDisplay10 = 127 ;
          break;
          case 84:
          homeDisplay1 = 102 ;
          homeDisplay10 = 127 ;
          break;
          case 85:
          homeDisplay1 = 109 ;
          homeDisplay10 = 127 ;
          break;
          case 86:
          homeDisplay1 = 125 ;
          homeDisplay10 = 127 ;
          break;
          case 87:
          homeDisplay1 = 7 ;
          homeDisplay10 = 127 ;
          break;
          case 88:
          homeDisplay1 = 127 ;
          homeDisplay10 = 127 ;
          break;
          case 89:
          homeDisplay1 = 111 ;
          homeDisplay10 = 127 ;
          break;
          case 90:
          homeDisplay1 = 63 ;
          homeDisplay10 = 111 ;
          break; 
          case 91:
          homeDisplay1 = 6 ;
          homeDisplay10 = 111 ;
          break;
          case 92:
          homeDisplay1 = 91 ;
          homeDisplay10 = 111 ;
          break;  
          case 93:
          homeDisplay1 = 79 ;
          homeDisplay10 = 111 ;
          break;
          case 94:
          homeDisplay1 = 102 ;
          homeDisplay10 = 111 ;
          break;
          case 95:
          homeDisplay1 = 109 ;
          homeDisplay10 = 111 ;
          break;
          case 96:
          homeDisplay1 = 125 ;
          homeDisplay10 = 111 ;
          break;
          case 97:
          homeDisplay1 = 7 ;
          homeDisplay10 = 111 ;
          break;
          case 98:
          homeDisplay1 = 127 ;
          homeDisplay10 = 111 ;
          break;
          case 99:
          homeDisplay1 = 111 ;
          homeDisplay10 = 111 ;
          break;
          }

    digitalWrite(25, LOW);
    shiftOut(23,27,MSBFIRST,homeDisplay10);  //SHIFTOUT 16 bits to 2x7 Segment Digits
    shiftOut(23,27,MSBFIRST,homeDisplay1);   //SHIFTOUT 16 bits to 2x7 Segment Digits
    digitalWrite(25, HIGH); 
        }
    }
}