Rearrange docu in /help and correct some examples

This commit is contained in:
fauresystems
2019-11-15 19:27:07 +01:00
parent ea0a9425d1
commit 447f33f62c
29 changed files with 157 additions and 96 deletions
@@ -5,7 +5,7 @@
simple MQTT props. Avoid delay() calls (except short ones) in loop() to
ensure CPU for MQTT protocol. Use PropsAction checks instead.
Copy and change it to build your fist Arduino connected props, you will
Copy and change it to build your first Arduino connected props, you will
only be limited by your imagination.
Requirements: install ArduinoProps.zip library.
@@ -5,7 +5,7 @@
simple MQTT props. Avoid delay() calls (except short ones) in loop() to
ensure CPU for MQTT protocol. Use PropsAction checks instead.
Copy and change it to build your fist Arduino connected props, you will
Copy and change it to build your first Arduino connected props, you will
only be limited by your imagination.
Requirements: install ArduinoProps.zip library.
@@ -52,7 +52,7 @@ void setup()
}
delay(1500); // time for shield stuff
// can do more static IP configuration, must be called after Ethernet.begin()
//Ethernet.setSubnetMask(IPAddress(255, 255, 255, 0));
//Ethernet.setGatewayIP(IPAddress(192, 168, 1, 1));
+13 -14
View File
@@ -5,7 +5,7 @@
simple MQTT props. Avoid delay() calls (except short ones) in loop() to
ensure CPU for MQTT protocol. Use PropsAction checks instead.
Copy and change it to build your fist Arduino connected props, you will
Copy and change it to build your first Arduino connected props, you will
only be limited by your imagination.
Requirements: install ArduinoProps.zip library.
@@ -60,20 +60,19 @@ void loop()
delay(250); // acceptable freeze for this props (otherwise use PropsAction for async-like behavior)
// do static IP configuration disabling the dhcp client, must be called after every WiFi.begin()
String fv = WiFi.firmwareVersion();
if (fv.startsWith("1.0")) {
Serial.println("Please upgrade the firmware for static IP");
// see https://github.com/fauresystems/ArduinoProps/blob/master/WifiNinaFirmware.md
}
else {
//WiFi.config(IPAddress(192, 168, 1, 21), // local_ip
// IPAddress(192, 168, 1, 1), // dns_server
// IPAddress(192, 168, 1, 1), // gateway
// IPAddress(255, 255, 255, 0)); // subnet
//WiFi.setHostname("wifiprops");
}
if (fv.startsWith("1.0")) {
Serial.println("Please upgrade the firmware for static IP");
// see https://github.com/fauresystems/ArduinoProps/blob/master/WifiNinaFirmware.md
}
else {
//WiFi.config(IPAddress(192, 168, 1, 21), // local_ip
// IPAddress(192, 168, 1, 1), // dns_server
// IPAddress(192, 168, 1, 1), // gateway
// IPAddress(255, 255, 255, 0)); // subnet
}
if (WiFi.status() == WL_CONNECTED) {
wifiBegun = true;
Serial.println(WiFi.localIP());
wifiBegun = true;
Serial.println(WiFi.localIP());
Serial.println(WiFi.subnetMask());
Serial.println(WiFi.gatewayIP());
} else {