         :ok
 
       {:error, reason} ->
-        {:error, to_string(reason)}
+        {:error, "Firmware error: #{inspect(reason)}"}
     end
   end
 

        val

      {:error, reason} ->
        {:error, reason}
    end
  end

  def write_pin(pin_number, mode, value) do
    case FarmbotFirmware.command({:pin_write, [p: pin_number, v: value, m: mode]}) do
      :ok -> :ok
      {:error, reason} -> {:error, reason}
    end
  end


        Keyword.fetch!(params, axis)

      {:error, reason} ->
        {:error, "Firmware error: #{inspect(reason)}"}
    end
  end

