@nikil511 & @hek want to say thankyou for your code. Its been really useful. my eps8266 is now running as a controller and posting readings to thingkspeak. Without the need for a computer turned on, so its been really useful. thanks
Are you still having range issues? I would recommend trying a to make a dipole first. They are simple and work well. They do need to be keep in the same polarisation or will attenuate the signal.
If still having range issue you could try a direction antenna after that.
Also if the floors have steel reo, that maybe blocking the signal, going for a longer wavelength frequency might not be the best option.
Also FYI helix/coil antennas reduce signal strength. Unless the antenna needs to be compact, i would avoid that.
If you still need help let me know