Parsing numbers from a serial input

I have managed to put the hardcoded calculations in a loop, generalizing it, so I can change the number of sensors. However, I still think there would be an even easier way?

    for (byte i = 0; i < nSensor; i++)
    {
      valueshex[i] = 0;
      for (uint8_t j = 0; j < 4; j++)
      {
        valueshex[i] = valueshex[i] | (((uint32_t)receivedBytes[3 + (i * 4) + j]) << (24 - (8 * j)));
      }
    }