[SOLVED] Trying to print another float on sprintf

void loop() {
  char daya[6], ampere[6];
  
  float mA = ACS.mA_AC(); //ACS712 Current
  dtostrf(mA, 4, 2, ampere);
  
  float Watt = (235L*mA)/1000.0; // Calculate V*i/1000.0
  if(Watt < 0){
    Watt = Watt*-1; //Preventing the watt value goes negative
  }
  dtostrf(Watt, 4, 2, daya);
  
  //Uplink to Antares
  if (millis() - previousMillis > interval) {
    previousMillis = millis();
    
    sprintf(myStr, "ACS Current(A)= %d. Power Usage (VA) = %s", ampere, daya);
    Serial.println("Sending to Antares... ");
    Serial.println(myStr);
    lora.sendUplink(myStr, strlen(myStr), mA);

    txpower = lora.getTxPower();
    Serial.print(F("Tx Power: ")); Serial.print(txpower);Serial.print("dBm");
  }
  // Check Lora RX
  lora.update();
}

Trying to print the "ampere" into "ACS Current(A)= %d" but i already have a float (Power Usage (VA) = %s). Thanks you in advance.

I do not understand. What is the problem?

Is this what you want?

sprintf(myStr, "ACS Current(A)= %d Ampere. Power Usage (VA) = %s", ampere, daya);

ampere is a string.

You need to use %s.

sprintf(myStr, "ACS Current(A)= %s. Power Usage (VA) = %s", ampere, daya);

Nope, all i need has been answered by the latest reply.

It worked. I thought the %s doesn't work when it's been use already. Thank you!
image