Skip to content
spigotx edited this page Jan 11, 2019 · 7 revisions

Table of Contents

Installation

Basic settings

Before upload program to arduino, you need to change basic settings in program

// ------------------ Basic settings ------------------
#define DEBUG_ON false		// flag to turn On/Off debugging    [True = On, False = Off]
#define STATIC_IP true     	// flag to use static IP            [True = Static IP, False = DHCP]                                                          
#define NTP_ON false            // flag to use NTP Server           [True = Use NTP server, False = Don't use NTP server]                                                   
// ----------------------------------------------------


// --- WiFi IP Settings ---
#if STATIC_IP
	// Static IP
	IPAddress ipaWifiIP(192, 168, 100, 250);
	IPAddress ipaWifiSubnet(255, 255, 255, 0);
	IPAddress ipaWifiGateway(192, 168, 100, 1);
	// If you don't wish to use DNS leave "ipaWifiDns" variable as it is, otherwise set yours DNS or Google DNS (8.8.8.8)
	IPAddress ipaWifiDns(0, 0, 0, 0);
	// Configure:
	String sHostName = "Moodlite";
	String sWifiSsd = "....";
	String sWifiPassword = "....";
#else
	// WiFi AP (DHCP)
	IPAddress ipaWifiApIP(192, 168, 100, 250);
	IPAddress ipaWifiApGateway(192, 168, 100, 1);
	IPAddress ipaWifiApSubnet(255, 255, 255, 0);
	// Leave unconfigured:
	String sHostName = "Moodlite";
	String sWifiSsd = "";
	String sWifiPassword = "";
	// AP Password
	// ! Must be at least 8 chars long
	const char* WIFI_AP_PASSWORD = "Moodlite";
#endif

If you have a boot problem after program upload, do a power reset (or with reset button on ESP device)

First setup

  1. Upload program (ino file) and SPIFFS (data folder),

  2. Connect to Moodlite

    a, Static IP - IP defined in program

    b, DHCP - AP called Moodlite - Use the default IP 192.168.100.250 in your internet browser.

Web interface

alt text

Fill data in a column:

  • SSID - name of your WiFi network
  • Password - password of your WiFi
  • Name - name you would like to use for device

And press "Set" button. If necessary provide power restart.

Web interface usage

LED tab

alt text alt text

This tab provides LEDs parameters, such as Brightness, Speed for patterns, etc.

Backlight - turn On/Off LEDs if automatic backlight parameter is turned off (form more information use: Settings tab)

Allow modification - turn On/Off possibility to change Brighntess, Speed and LED color. If you want to store these parameters in memory turn this switch On, then change parameters and turn switch Off.

Brightness - LED brightness.

Speed - LED patterns speed.

LED Color - LED color (Pattern 0). After you click into "input box", colorpicker will show. After choosing color press color picker icon (in the right corner of color picker).

Pattern - different kind of patterns for LEDs, except Pattern 0. Pattern 0 set all LEDs in one color (LED Color property).

Settings tab

alt text

Display On Enabled - Enables/Disable automatic backlight during "Display On" time.

NTP server - NTP server to sync with time form automatic backlight.

Nr. of LEDs/Corner - number of LEDs in Tiles corner.

Total Nr. of LEDs - total number of LEDs connected.

WiFi tab

alt text

Your local WiFi settings.

Usage

Timezone

For your time zone, you need to modify Timezone part of the code. See for details.

// Central European Time (Frankfurt, Paris)
// Central European Summer Time
TimeChangeRule tchrCest = { "CEST", Last, Sun, Mar, 2, 120 };
// Central European Standard Time
TimeChangeRule tchrCet = { "CET", Last, Sun, Oct, 3, 60 };

SPIFFS

Install SPIFFS

To install SPIFFS support follow procedure

Upload SPIFFS data

To upload SPIFFS data to Arduino you need to have "data" folder in the same folder as "Moodlite.ino" file. Then follow the same procedure as shown in the picture:

alt text

FAQ

Wrong WiFi credentials (Bootloops)

Change this:

// Erase EEPROM
//eraseEEPROM();

to this:

// Erase EEPROM
eraseEEPROM();

Than flash the program again, let it boot and comment out the function (as it was before) and flash again .