Hoi friends,
i am using 2 MEGAs connected via I2C.
Slave collects datas from sensors and send them to the Master.
The datas send are byte and i cant print it directly on the TFT.
Serial.print(someCrap, 2);
does NOT make someCrap into some magic new value. It invokes a function (print()) that is defined in a class (HardwareSerial, that Serial is an instance of) that performs some specific action.
You can't remove the instance name and the function call and expect the same action.
In MY dreams i'll find a forum where a question of mine was answered and where a respectful tone prevails.
Its fine that you knwo all answers and MAYBE you got it all in one.
Hard to believe, but some people have to learn some things that had to be declared
Humor me, before you go off in a huff. Look at the documentation for the humidity member of the DHT class. Change the type of h to match the type of humidity. Loose the parentheses and the ,2.
float h = DHT.humidity;
Now, call your function with h, which is now a float, as the function suggests it deals with, AND contains a value like 21.50, not the value 2 which is what the comma operator returned, to be assigned to h, and not 21 which is what would be stored in an int.