I'm using Arduino 1.6.5 and when I try to upload the "ConnectwithWPA" example sketch
From what library? If you are using the example from the WiFi folder in the core libraries folder, that is for THE Arduino WiFi shield, which is NOT what you have. So, it's no wonder the code can't find THE Arduino WiFi shield.
before you waste to much time. when you hook up the wifi shield run the server built in example. Once you pull up the server example code using a computer not connected to the arduino, keep the arduino hooked up for 3 days. In three days see if the arduino will respond.
The results I found are the reasons the wifi shield was discontinued. Using the wifi shield will cause the arduino to become unresponsive "freeze" within 2 weeks. Usually it takes 12-20 minutes but I found that depending on your code the time will vary. Even if you only run the wifi code once and close the server, it will not go 3 days without becoming unresponsive.
I was told the problem is in the firmware of the wifi shield.
Using the shield as a client only allows the shield to run without freezing the arduino for a little longer, but it the results will be the same within a day or two longer than if used as a server.
Hope this saves you some time. I'm not sure if the yun has the same problem.
Hi Travis,
I recently bought a CC3000 WiFi Shield for Arduino UNO R3 MEGA2560 SimpleLink smartConfig with SD board from ebay and i am having the same problem. Did u resolve the issue and did your wifi shield go past the shield not present error. Please share your updates on how you fixed it.
Thanks.