You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-14Lines changed: 7 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,10 @@ This document (the README file) is a hub to give you some information about the
21
21
*[How can you get involved?](#get-involved)
22
22
*[Get in touch](#contact-us)
23
23
*[Find out more](#find-out-more)
24
+
*[Installation](#install)
25
+
*[Building](#build)
26
+
*[Running](#running)
27
+
*[License](#license)
24
28
25
29
## What are we doing?
26
30
@@ -103,18 +107,7 @@ And of course, you'll want to know our:
103
107
104
108
Thank you so much (Danke schön! Merci beaucoup!) for visiting the project and we do hope that you'll join us on this amazing journey to make programming with OpenBCI fun and easy.
105
109
106
-
# Documentation
107
-
108
-
### Table of Contents:
109
-
---
110
-
111
-
1.[Installation](#install)
112
-
2.[Building](#build)
113
-
3.[Running](#running)
114
-
4.[License](#license)
115
-
116
-
117
-
### <aname="install"></a> Installation:
110
+
## <aname="install"></a> Installation:
118
111
119
112
Use the `DefaultWifiShield.ino` in examples.
120
113
@@ -129,7 +122,7 @@ The ESP8266 runs arduino as well so there are several installs that need to happ
129
122
The library we are interested in using is the [`SPISlave`](https://github.com/esp8266/Arduino/tree/master/libraries/SPISlave).
130
123
131
124
132
-
###<aname="build"></a> Building and Flashing:
125
+
## <aname="build"></a> Building and Flashing:
133
126
134
127
There are two steps to flashing code. Compiling the codebase, and then flashing it onto the wifi module.
135
128
Makefiles make it a lot easier. Especially if you use [makeEspArduino](https://github.com/plerup/makeEspArduino). Follow the instructions from the project's github.
@@ -156,7 +149,7 @@ The `make` command runs the default commands from `makeEspArduino` with OpenBCI_
String out = "<!DOCTYPE html><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><html lang=\"en\"><h1 style=\"margin: auto\;width: 80%\;text-align: center\;\">Push The World</h1><br><p style=\"margin: auto\;width: 80%\;text-align: center\;\"><a href='http://";
179
+
if (WiFi.localIP().toString().equals("192.168.4.1") || WiFi.localIP().toString().equals("0.0.0.0")) {
180
+
out += "192.168.4.1";
181
+
} else {
182
+
out += WiFi.localIP().toString();
183
+
}
184
+
out += HTTP_ROUTE;
185
+
out += "'>Click to Go To WiFi Manager</a></p><html>";
186
+
server.send(200, "text/html", out);
187
+
188
+
ledFlashes = 5;
189
+
ledInterval = 250;
190
+
ledLastFlash = millis();
191
+
192
+
startWifiManager = true;
179
193
}
180
194
181
195
JsonObject& getArgFromArgs(int args) {
@@ -500,24 +514,46 @@ void setup() {
500
514
#ifdef DEBUG
501
515
debugPrintGet();
502
516
#endif
503
-
String out = "<!DOCTYPE html><html lang=\"en\"><h1 style=\"margin: auto\;width: 50%\;text-align: center\;\">Push The World</h1><br><p style=\"margin: auto\;width: 50%\;text-align: center\;\"><a href='http://";
517
+
String ip = "192.168.4.1";
518
+
String out = "<!DOCTYPE html><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><html lang=\"en\"><h1 style=\"margin: auto\;width: 90%\;text-align: center\;\">Push The World</h1><br>";
504
519
if (WiFi.localIP().toString().equals("192.168.4.1") || WiFi.localIP().toString().equals("0.0.0.0")) {
505
520
if (WiFi.SSID().equals("")) {
521
+
out += "<p style=\"margin: auto\;width: 80%\;text-align: center\;\"><a href='http://";
506
522
out += "192.168.4.1";
507
-
out += HTTP_ROUTE_WIFI;
508
-
out += "'>Click to Configure Wifi</a></p><br>";
523
+
out += HTTP_ROUTE_WIFI_CONFIG;
524
+
out += "'>Click to Configure Wifi</a><br>If the above link does not work type 192.168.4.1/wifi in web browser and press Enter or Go.<br>See updates on issue <a href='https://github.com/OpenBCI/OpenBCI_WIFI/issues/62'>#62</a> on Github.</p><br>";
509
525
} else {
526
+
out += "<p style=\"margin: auto\;width: 80%\;text-align: center\;\"><a href='http://";
527
+
out += "192.168.4.1";
528
+
out += HTTP_ROUTE_WIFI_CONFIG;
529
+
out += "'>Click to Configure Wifi</a><br>If the above link does not work type 192.168.4.1/wifi in web browser and press Enter or Go.<br>See updates on issue <a href='https://github.com/OpenBCI/OpenBCI_WIFI/issues/62'>#62</a> on Github.</p><br>";
530
+
out += "<p style=\"margin: auto\;width: 80%\;text-align: center\;\"><a href='http://";
510
531
out += "192.168.4.1";
511
532
out += HTTP_ROUTE_WIFI_DELETE;
512
533
out += "'>Click to Erase Wifi Credentials</a></p><br>";
513
534
}
514
535
} else {
536
+
out += "<p style=\"margin: auto\;width: 80%\;text-align: center\;\"><a href='http://";
537
+
out += WiFi.localIP().toString();
538
+
out += HTTP_ROUTE_WIFI_CONFIG;
539
+
out += "'>Click to Configure Wifi</a><br>If the above link does not work type ";
540
+
out += WiFi.localIP().toString();
541
+
out += "/wifi in web browser and press Enter or Go.<br>See updates on issue <a href='https://github.com/OpenBCI/OpenBCI_WIFI/issues/62'>#62</a> on Github.</p><br>";
542
+
out += "<p style=\"margin: auto\;width: 80%\;text-align: center\;\"><a href='http://";
515
543
out += WiFi.localIP().toString();
516
544
out += HTTP_ROUTE_WIFI_DELETE;
517
545
out += "'>Click to Erase Wifi Credentials</a></p><br>";
518
546
}
519
-
out += "<p style=\"margin: auto\;width: 50%\;text-align: center\;\"> Please visit <a href='https://app.swaggerhub.com/apis/pushtheworld/openbci-wifi-server/2.0.0'>Swaggerhub</a> for the latest HTTP endpoints</p><br>";
0 commit comments