Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.

Software installation

Tobias Blum edited this page Feb 5, 2017 · 39 revisions

You need to complete the following steps to build your development environment that enables you to flash the Mc Lighting software to the ESP8622.

Arduino Software (tested with 1.8.1)

Download and install the arduino software (IDE) at https://www.arduino.cc/en/Main/Software

ESP8266 board support for arduino IDE

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 Preferences

Go to "Tools" > "Board: " > "Boards Manager ...", search for "esp" and install the "esp8266 by ESP8266 Community" in version 2.3.0 (https://github.com/esp8266/Arduino): Preferences

Now go to "Tools" > "Board: " and choose "NodeMCU 1.0 (ESP-12E Module)", set CPU frequency to 80 MHz, and Flash size to "4M (1M SPIFFS)"leave upload spped at 115200. Select the right COM port.

Used Libraries

Go to "Sketch" > "Include Library" > "Manage Libraries ..." and install the following libraries by searching for them and installing:

Go to: https://github.com/kitesurfer1404/WS2812FX and download the library repository as ZIP. Load that library into to Arduino software by: "Sketch > Include Library > Add .ZIP Library".

Compiling and upload

Now open the MC Lighting Arduino sketch in the IDE via "File" > "Open ...". Have a look at the "definitions.h" and change the values here to fit your setup:

// Neopixel
#define PIN 5         // PIN where neopixel / WS2811 strip is attached
#define NUMLEDS 12    // Number of leds in the strip

#define HOSTNAME "ESP8266_01"   // Friedly hostname

Now you have done everything to get all the dependencies. You should now 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" (or by clicking the right arrow in the tool bar).

Connecting to your WiFi

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

I also created a little video that shows the steps:
Captive Portal

In short words:

  • Start up your ESP8266, the little LED on the module should blink now and the LEDs should all green.
  • The ESP8266 opens up a new WiFi Network with the name you provided in the definitions.h.
  • Connect your PC or Smartphone to the Wifi and follow the steps to provide your WiFi credentials.
  • The ESP8266 restarts and should be reachable via it's name or IP (have a look at the debug output in the Arduino software).

Upload the webpage to the SPIFFS filesystem

Next step is to upload the webpages to the ESP8266. This is done that way:

  1. Go to http://YOUR_ESP8266_HOSTNAME_OR_IP/upload.
  2. A simple upload form should appear.
  3. Upload the index.htm from the "McLighting\clients\web\build" directory.
  4. Optional: Upload the edit.htm.gz to get a editor for your filesystem via http://YOUR_ESP8266_HOSTNAME_OR_IP/edit.

Clone this wiki locally