Re: Physical switch vs. virtual switch
Posted: Wed Oct 25, 2017 10:35 am
My lab is in fact facing south, however it is neither painted green nor far from wifi. It is downtown Barcelona, Spain so its probably so full of wifi signals you could run a fridge on it. I plead guilty on the cheap chinese chips, however the power source is a stable bench power supply. I have the test running on 3 of those little buggers now and what do you know, they are doing some serious time counting
@philbowles The test code complained about CSTR and say, so i modified it a bit and hope i got the idea.
The output on console is now:
P.S.: Trying to google the term "say" proved to be a fun but futile effort
@philbowles The test code complained about CSTR and say, so i modified it a bit and hope i got the idea.
The output on console is now:
PHY mode: N
Channel: 6
AP id: 0
Status: 1
Auto connect: 1
SSID (11): MYSSID
Passphrase (10): MYPASSWORD
BSSID set: 0
[WiFi-event] event: 0
WiFi Connected SSID=MYSSID
[WiFi-event] event: 3
Yay, i got an IP
IP address:
192.168.1.111
Code: Select all
void WiFiEvent(WiFiEvent_t event) {
Serial.printf("[WiFi-event] event: %d\n", event);
switch(event) {
case WIFI_EVENT_STAMODE_GOT_IP:
Serial.println("Yay, i got an IP");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
break;
case WIFI_EVENT_STAMODE_DISCONNECTED:
Serial.println("WiFi lost connection");
break;
case WIFI_EVENT_STAMODE_CONNECTED:
Serial.print("WiFi Connected SSID=");
Serial.printf("%s");
Serial.println(ssid);
break;
case WIFI_EVENT_SOFTAPMODE_STADISCONNECTED:
Serial.println("WIFI_EVENT_SOFTAPMODE_STADISCONNECTED");
break;
case WIFI_EVENT_SOFTAPMODE_PROBEREQRECVED:
Serial.println("WIFI_EVENT_SOFTAPMODE_PROBEREQRECVED");
break;
}
}
P.S.: Trying to google the term "say" proved to be a fun but futile effort