This message was posted on behalf of Intel Corporation
Thank you for your interest in the Intel® Edison.
In order to configure your Edison device as a Wi-Fi client, I’ll suggest you to check section 4 of the Intel® Edison – Wi-Fi Guide (https://www.intel.com/content/dam/support/us/en/documents/edison/sb/edison_wifi_331438001.pdf).
Providing and debugging Python code is out of the scope of this technical support team, but perhaps you may be interested in checking this couple of alternatives:
Using Intel® Edison: Building an IoT Sensor Node
Using Intel® Edison: Securely Connect IoT Sensor to the Internet with MQTT
Intel® Edison Board: IoT Temperature Monitoring
Just keep in mind that for the last example, the author uses Cloud Analytics from Intel, which has been discontinued. So please consider one of the alternatives suggested in this link https://software.intel.com/en-us/iot/hardware/edison#cloud.
If you have any other question, don’t hesitate to contact us.
Have a nice day.
Thankyou Andres V for your help..