-
Notifications
You must be signed in to change notification settings - Fork 117
Software Setup
Download and install the arduino software (IDE), found at https://www.arduino.cc/en/Main/Software
In the Arduino IDE open the preferences dialog and enter the following URL as "Additional Boards Manger URL":
http://arduino.esp8266.com/stable/package_esp8266com_index.json
Go to "Tools" > "Board: " > "Boards Manager ...", search for "esp" and install the "esp8266 by ESP8266 Community", version 2.5.0-beta2 (or newer) (https://github.com/esp8266/Arduino):
Now go to "Tools" > "Board: " and choose your ESP8266 board. If in doubt, use "LOLIN(WEMOS) D1 R2 & mini".
Set CPU frequency to 80 MHz, and Flash size to "4M (1M SPIFFS)" leave upload speed at 115200 (you could try to set it higher if it makes no problems).
Select the right COM port.
Leave "IwIP Variant" at "v2 Lower Memory".
Go to "Sketch" > "Include Library" > "Manage Libraries ..." and install the following libraries by searching for them and installing:
-
WebSockets by @Links2004 (tested with version 2.1.1)
https://github.com/Links2004/arduinoWebSockets -
(optional) ESP8266-ping by @bluemurder
https://github.com/bluemurder/ESP8266-ping
- if using a Git client, checkout gbs-control (https://github.com/ramapcsx2/gbs-control.git)
- (alternative): download the current master .zip (https://github.com/ramapcsx2/gbs-control/archive/master.zip)
- start the Arduino IDE by opening gbs-control.ino
You should be able to build the software by choosing "Sketch" > "Verify / Compile" (or clicking the tick mark in the tool bar).
Please verify that you have connected the ESP board correctly to your computer via USB and that the correct COM port is chosen.
Now you should be able to upload the compiled sketch to the board via "Sketch" > "Upload" (hit "Ctrl + U" or by clicking the right arrow in the tool bar). This could take a while for the first compilation.
If you want to try out the latest versions, use the development branch instead:
https://github.com/ramapcsx2/gbs-control/archive/development.zip
The next step is to connect the ESP8266 to your wifi. The project uses the great WiFiManger library to provide a captive portal.
The steps are shown in detail here: https://github.com/tzapu/WiFiManager#how-it-works
In short words:
- Start up your ESP8266, the LED on the module should come on
- The ESP8266 opens up a new WiFi Network with the name "gbscontrol"
- Connect your PC or Smartphone to the Wifi and open any webpage, such as (example) dd.de
- The captive portal should intercept the request, and present you with the gbscontrol interface
- (The web interface is fully working now. If you don't want to connect to your home network, you can stop here.)
- Scroll down to the bottom of the page and hit "Connect to WiFi Network"
- Enter your home network SSID (name) and password
- The ESP8266 restarts and will be reachable via:
- IP (have a look at the debug output in the Arduino software)
- the address "gbscontrol"
- the address "gbscontrol.local" (requires mDNS support from your operating system)
- Note: The ESP8266 remembers this network, so it will always try to connect to this network from now on (this can be cleared via Arduino IDE)
That's it!
Head over to the other Wiki pages if you want further information.
This setup guide has been lifted with permission from @toblum and his nice McLighting project ;)
https://github.com/toblum/McLighting/