I’m thinking this chat GDP type stuff is going to become a regular feature , requiring “adjustment “ by forum types .
The OP needs to understand something of coding to make this work properly ( as do we all !).
The code uses Vcc as a reference , which will introduce errors .
400watts max will take a while heat a water tank , typical output could be much lower , not enough to heat a cup full .
As per the guidelines we need a circuit diagram , current taken by a motor may not be steady .