code: protected static Platform getDefaultPlatform(){
          // attempt to get assigned platform identifier from the environment variables
          String envPlatformId = System.getenv("PI4J_PLATFORM");
  
          // attempt to get assigned platform identifier from the system properties
          String platformId = System.getProperty("pi4j.platform", envPlatformId);
  
          // if a platform id was found in the system properties, then
          // attempt to lookup the platform enumeration using the platform
          // identifier string.  If found then return the platform enum.
          if(platformId != null && !platformId.isEmpty()){
              Platform pltfrm = Platform.fromId(platformId);
              if(pltfrm != null){
                  return pltfrm;
              }
          }
  
          // the RASPBERRY_PI is the default platform;
          // (... in time perhaps some auto-platform detection could be implemented here ...)
          return Platform.RASPBERRYPI;
      }
docs: Internal method to get the default platform.  It will attempt to first
  get the platform using the 'PI4J_PLATFORM' environment variable, if the
  environment variable is not configured, then it will attempt to use the
  system property "pi4j.platform".  If the system property is not found or
  the value is not legal, then return the default 'RASPBERRY_PI' platform.
  
  @return default platform enumeration