Your ISP connection may be bad. Try adding a connectWiFi() function and calling it each main loop if there is no connection:
<put this in loop>
if(WiFi.status() != WL_CONNECTED)
{ connectWifi(); } // Make sure we have an internet connection
<put this after the end of your program>
int connectWifi()
{
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(2500);
Serial.println("Connecting to WiFi"); // Inform the serial output
}
Serial.println("Connected");
ThingSpeak.begin(client);
}
You will need Serial.begin(9600) in your setup().
For the thingspeak commands, you can at least test for success:
int success=ThingSpeak.writeField(myChannelNumber, 1, voltage, myWriteAPIKey);
Serial.println("success "+String(success));
You can see the serial monitor by pressing ctrl shift m or hitting the plus/curcle icon on the right top of the IDE window.
Do you see the number of entries in your channel growing - even if you see no data in your plot?