Is it possible to WiFi connect a PHOTON to a Local Server running on PC (hard wired to modem)?? Still UNABLE to connect to local server… I find other HW examples but not PHOTON… PLEASE, Please help… (Please)
I need the model for:
- connecting two PHOTONs
- Using Bridge … WidgetBridge bridge1(V3);
- To a private LOCAL server (Win 10 PC based, HARD WIRED to Comcast modem)
- Connecting wireless, Photon to Comcast Modem, to wired to PC Server
Have been successful connecting to Blynk Server, but never to LOCAL server.
This is my current FAILing setup:
SYSTEM_MODE(SEMI_AUTOMATIC);
WiFi.on();
delay (1000);
Blynk.config(ssid,pass); // actual connection will happen in the AUTO start section
Blynk.config(CV_Transmitter,localserver,8442 );
// tried this in frustration Blynk.disconnect();
//NOTE: this errors… has no member Blynk.connectWiFi(ssid,pass);
// WiFi.connect(); // tried this
// Blynk.begin(CV_Transmitter,localserver,8442 )// tried this
//Blynk.connect(); // tried to force this here
Both attempts below at starting and restarting continually fail…
SETUP USES THIS…
int mytimeout = millis() / 1000;
while (Blynk.connect(1000) == false)
{ // wait here until connected to the server
if ((millis() / 1000) > mytimeout + 8)
{ // try to connect to the server for less than 9 seconds
break;
} // END IF
} // End WHILE
Timer triggers THIS RESTART…
void reconnectBlynk() // reconnect to server if disconnected, timer checks every 15 seconds
{
if (!Blynk.connected())
{
if (Blynk.connect()) { BLYNK_LOG(“Reconnected”); Serial.println(“DDD Reconnected”); } // END if
else { BLYNK_LOG("Not reconnected"); Serial.println(" EEEE Not reconnected"); } // END else
} // End if