Skip to content

Commit

Permalink
Merge pull request #98 from Qrome/2.10
Browse files Browse the repository at this point in the history
2.10
  • Loading branch information
Qrome authored Mar 15, 2019
2 parents 5fa87de + e00f3f5 commit 8f2957f
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 469 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ Double Wide LED version: https://www.thingiverse.com/thing:2989552

## Upgrading from version 2.5 or Higher
Version 2.5 introduced the ability to upgrade pre-compiled firmware from a binary file. In version 2.6 and on you should find binary files that can be uploaded to your marque scrolling clock via the web interface. From the main menu in the web interface select "Firmware Update" and follow the prompts.
* **marquee.ino.d1_mini_2.6.bin** - compiled for Wemos D1 Mini and standard 4x1 LED (default)
* **marquee.ino.d1_mini_wide_2.6.bin** - compiled for Wemos D1 Mini and double wide 8x1 LED display
* **marquee.ino.d1_mini_2.10.bin** - compiled for Wemos D1 Mini and standard 4x1 LED (default)
* **marquee.ino.d1_mini_wide_2.10.bin** - compiled for Wemos D1 Mini and double wide 8x1 LED display

## Compiling and Loading to Wemos D1
It is recommended to use Arduino IDE. You will need to configure Arduino IDE to work with the Wemos board and USB port and installed the required USB drivers etc.
* USB CH340G drivers: https://wiki.wemos.cc/downloads
* Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. This will add support for the Wemos D1 Mini to Arduino IDE.
* Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
* Select Board: "WeMos D1 R2 & mini" or "LOLIN(WEMOS) D1 R2 & mini"
* Set 1M SPIFFS -- this project uses SPIFFS for saving and reading configuration settings.
* Set 1M SPIFFS -- **this project requires SPIFFS for saving and reading configuration settings.**

## Loading Supporting Library Files in Arduino
Use the Arduino guide for details on how to installing and manage libraries https://www.arduino.cc/en/Guide/Libraries
Expand All @@ -80,19 +80,20 @@ Use the Arduino guide for details on how to installing and manage libraries http
<WiFiManager.h> --> https://github.com/tzapu/WiFiManager
"FS.h"
<SPI.h>
<Adafruit_GFX.h> --> https://github.com/adafruit/Adafruit-GFX-Library
<TimeLib.h> --> https://github.com/PaulStoffregen/Time
<Adafruit_GFX.h> --> https://github.com/adafruit/Adafruit-GFX-Library
<Max72xxPanel.h> --> https://github.com/markruys/arduino-Max72xxPanel
<JsonStreamingParser.h> --> https://github.com/squix78/json-streaming-parser

Note ArduinoJson (version 5.13.1) is now included as a library file in version 2.7 and later.

## Initial Configuration
Starting with version 2.0 editing the **Settings.h** file is optional. All API Keys are now managed in the Web Interface except for the GeoNames Key. It is not required to edit the Settings.h file before loading and running the code.
* Open Weather Map API Key: http://openweathermap.org/
* News API Key: https://newsapi.org/
* GeoNames Key (optional as you can use mine or create your own) http://www.geonames.org/ -- this key is only managed in the Settings.h file.
* Your OctoPrint API Key (optional if you use the OctoPrint status)
* Version 2.0 supports Chained 4x1 LED displayes -- configure in the Settigns.h file.
* Open Weather Map free API key: http://openweathermap.org/ -- this is used to get weather data and the latitude and longitude for the current time zone. Weather API key is required for correct time.
* TimeZoneDB free registration for API key: https://timezonedb.com/register -- this is used for setting the time and getting the correct time zone as well as managing time changes due to Day Light Savings time by regions. This key is set and managed only through the web interface and added in version 2.10 of Marquee Scroller. TimeZoneDB key is required for correct time display.
* News API key (free): https://newsapi.org/ -- Optional if you want to get current news headlines.
* Your OctoPrint API Key -- optional if you use the OctoPrint status.
* Version 2.0 supports Chained 4x1 LED displays -- configure in the Settings.h file.

NOTE: The settings in the Settings.h are the default settings for the first loading. After loading you will manage changes to the settings via the Web Interface. If you want to change settings again in the settings.h, you will need to erase the file system on the Wemos or use the “Reset Settings” option in the Web Interface.

Expand Down
Binary file added marquee.ino.d1_mini_2.10.bin
Binary file not shown.
Binary file removed marquee.ino.d1_mini_2.9.bin
Binary file not shown.
Binary file added marquee.ino.d1_mini_wide_2.10.bin
Binary file not shown.
Binary file removed marquee.ino.d1_mini_wide_2.9.bin
Binary file not shown.
54 changes: 0 additions & 54 deletions marquee/GeoNamesClient.h

This file was deleted.

2 changes: 2 additions & 0 deletions marquee/NewsApiClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ String NewsApiClient::cleanText(String text) {
text.replace("", "\"");
text.replace("`", "'");
text.replace("", "'");
text.replace("", "'");
text.replace("\\\"", "'");
text.replace("", "-");
text.replace("é", "e");
Expand Down Expand Up @@ -184,5 +185,6 @@ String NewsApiClient::cleanText(String text) {
text.replace("ü", "ue");
text.replace("Ä", "Ae");
text.replace("ä", "ae");
text.replace("ß", "ss");
return text;
}
2 changes: 1 addition & 1 deletion marquee/NewsApiClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SOFTWARE.
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <JsonListener.h>
#include <JsonStreamingParser.h>
#include <JsonStreamingParser.h> // --> https://github.com/squix78/json-streaming-parser

class NewsApiClient: public JsonListener {

Expand Down
18 changes: 8 additions & 10 deletions marquee/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,16 @@ SOFTWARE.
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPUpdateServer.h>
#include <WiFiManager.h>
#include <WiFiManager.h> // --> https://github.com/tzapu/WiFiManager
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include "FS.h"
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Max72xxPanel.h>
#include <Adafruit_GFX.h> // --> https://github.com/adafruit/Adafruit-GFX-Library
#include <Max72xxPanel.h> // --> https://github.com/markruys/arduino-Max72xxPanel
#include <pgmspace.h>
#include "OpenWeatherMapClient.h"
#include "GeoNamesClient.h"
#include "TimeClient.h" // Using updated lib by Qrome
#include "TimeDB.h"
#include "NewsApiClient.h"
#include "OctoPrintClient.h"
#include "BitcoinApiClient.h"
Expand All @@ -57,21 +56,22 @@ SOFTWARE.
// Start Settings
//******************************

String TIMEDBKEY = ""; // Your API Key from https://timezonedb.com/register
String APIKEY = ""; // Your API Key from http://openweathermap.org/
// Default City Location (use http://openweathermap.org/find to find city ID)
int CityIDs[] = { 5304391 }; //Only USE ONE for weather marquee
String marqueeMessage = "";
boolean IS_METRIC = false; // false = Imperial and true = Metric
boolean IS_24HOUR = false; // 23:00 millitary 24 hour clock
boolean IS_DST = true; // Does your TimeZone use Daylight Savings Time (DST)?
boolean IS_PM = true; // Show PM indicator on Clock when in AM/PM mode
const int WEBSERVER_PORT = 80; // The port you can access this device on over HTTP
const boolean WEBSERVER_ENABLED = true; // Device will provide a web interface via http://[ip]:[port]/
boolean IS_BASIC_AUTH = true; // Use Basic Authorization for Configuration security on Web Interface
boolean IS_BASIC_AUTH = false; // Use Basic Authorization for Configuration security on Web Interface
char* www_username = "admin"; // User account for the Web Interface
char* www_password = "password"; // Password for the Web Interface
int minutesBetweenDataRefresh = 15; // Time in minutes between data refresh (default 15 minutes)
int minutesBetweenScrolling = 1; // Time in minutes between scrolling data (default 1 minutes and max is 10)
int displayScrollSpeed = 25; // In milliseconds -- Configurable by the web UI (slow = 35, normal = 25, fast = 15)
int displayScrollSpeed = 25; // In milliseconds -- Configurable by the web UI (slow = 35, normal = 25, fast = 15, very fast = 5)
boolean flashOnSeconds = true; // when true the : character in the time will flash on and off as a seconds indicator

boolean NEWS_ENABLED = true;
Expand All @@ -97,8 +97,6 @@ int ledRotation = 3;
String timeDisplayTurnsOn = "06:30"; // 24 Hour Format HH:MM -- Leave blank for always on. (ie 05:30)
String timeDisplayTurnsOff = "23:00"; // 24 Hour Format HH:MM -- Leave blank for always on. Both must be set to work.

const String GEONAMES_USER = "qrome"; // user account for http://www.geonames.org/ -- this service is used to lookup TimeZone Offsets

// OctoPrint Monitoring -- Monitor your 3D printer OctoPrint Server
boolean OCTOPRINT_ENABLED = false;
boolean OCTOPRINT_PROGRESS = true;
Expand Down
154 changes: 0 additions & 154 deletions marquee/TimeClient.cpp

This file was deleted.

Loading

0 comments on commit 8f2957f

Please sign in to comment.