no it is an int, it only gets messed up when the first one is say %f (the ct sensors) then switch to %d (humidity). Like above, if i do one or the other in the code, as opposed to two it works great.
so here is the response as an example
{"ct1": 1.600000, "humidity": 1952653947}
CT1 is right, but humidity should say 39
Its like the statement is trying to use %f as well for humidity instead of the %d specified. If i change both to %d then the ct is wrong and the humidity is right. Can I not mix?
@Keaner, the limit is 255. However, the limit I was referring to was using sizeof() in snprintf(). The statement clearly will not exceed the limit the way it is right now. I just wanted to see if there is something odd about snprintf vs sprintf causing the problem.
When asking such a question you should include the declaration of the respective variables too.
If your fix worked I’d assume the variables were not declared compatible to the format string.
Also check for name collisions/scope of variables.