Arduino uno wifi can't connect to wifi after setting fixed ip

You mention two different subnets !

192.168.240.1
192.168.3.1

Should they not both be in the same range eg. 192.168.3.1 and 192.168.3.? rather than 3 and 240.