Прошло 2 года.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.13.0)
|
||||
set(EXTRA_COMPONENT_DIRS "../../")
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(weather)
|
||||
@@ -0,0 +1,21 @@
|
||||
This software, the ideas and concepts is Copyright (c) David Bird 2014 and beyond.
|
||||
|
||||
All rights to this software are reserved.
|
||||
|
||||
It is prohibited to redistribute or reproduce of any part or all of the software contents in any form other than the following:
|
||||
|
||||
1. You may print or download to a local hard disk extracts for your personal and non-commercial use only.
|
||||
|
||||
2. You may copy the content to individual third parties for their personal use, but only if you acknowledge the author David Bird as the source of the material.
|
||||
|
||||
3. You may not, except with my express written permission, distribute or commercially exploit the content.
|
||||
|
||||
4. You may not transmit it or store it in any other website or other form of electronic retrieval system for commercial purposes.
|
||||
|
||||
5. You MUST include all of this copyright and permission notice ('as annotated') and this shall be included in all copies or substantial portions of the software and where the software use is visible to an end-user.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" FOR PRIVATE USE ONLY, IT IS NOT FOR COMMERCIAL USE IN WHOLE OR PART OR CONCEPT.
|
||||
|
||||
FOR PERSONAL USE IT IS SUPPLIED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
|
||||
IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,41 @@
|
||||
Weather display example
|
||||
=======================================
|
||||
|
||||
This is **port of project https://github.com/G6EJD/ESP32-e-Paper-Weather-Display by David Bird 2018** to work with ED097OC4 Kindle display and this driver.
|
||||
**Please note that David Bird (https://github.com/G6EJD) owns the copyright to this software!** Only minor modifications where made for it to run with the epdiy driver.
|
||||
THe license details are outlined in **License.txt**.
|
||||
|
||||
Building It
|
||||
-----------
|
||||
|
||||
- Girst you need to install Arduino esp-idf as a component https://github.com/espressif/arduino-esp32/blob/master/docs/esp-idf_component.md (the easiest way is to put it into components folder of ESP-IDF)
|
||||
- Put Arduino JSON https://github.com/bblanchon/ArduinoJson into components/arduino/
|
||||
- Dont forget to insert your Wi-Fi settings and openweathermap API key into owm_credentials.h
|
||||
- If you want to add more fonts, firmware may not fit into 1M and easiest way to fix it is to edit components/partition_table/partitions_singleapp.csv and change 1M to 2M
|
||||
|
||||

|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This software, the ideas and concepts is Copyright (c) David Bird 2014 and beyond.
|
||||
|
||||
All rights to this software are reserved.
|
||||
|
||||
It is prohibited to redistribute or reproduce of any part or all of the software contents in any form other than the following:
|
||||
|
||||
1. You may print or download to a local hard disk extracts for your personal and non-commercial use only.
|
||||
|
||||
2. You may copy the content to individual third parties for their personal use, but only if you acknowledge the author David Bird as the source of the material.
|
||||
|
||||
3. You may not, except with my express written permission, distribute or commercially exploit the content.
|
||||
|
||||
4. You may not transmit it or store it in any other website or other form of electronic retrieval system for commercial purposes.
|
||||
|
||||
5. You MUST include all of this copyright and permission notice ('as annotated') and this shall be included in all copies or substantial portions of the software and where the software use is visible to an end-user.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" FOR PRIVATE USE ONLY, IT IS NOT FOR COMMERCIAL USE IN WHOLE OR PART OR CONCEPT.
|
||||
|
||||
FOR PERSONAL USE IT IS SUPPLIED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
|
||||
IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
set(app_sources "weather.cpp")
|
||||
|
||||
idf_component_register(SRCS ${app_sources}
|
||||
REQUIRES epdiy arduino)
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef FORECAST_RECORD_H_
|
||||
#define FORECAST_RECORD_H_
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
typedef struct { // For current Day and Day 1, 2, 3, etc
|
||||
String Dt;
|
||||
String Period;
|
||||
String Icon;
|
||||
String Trend;
|
||||
String Main0;
|
||||
String Forecast0;
|
||||
String Forecast1;
|
||||
String Forecast2;
|
||||
String Description;
|
||||
String Time;
|
||||
String Country;
|
||||
float lat;
|
||||
float lon;
|
||||
float Temperature;
|
||||
float Humidity;
|
||||
float High;
|
||||
float Low;
|
||||
float Winddir;
|
||||
float Windspeed;
|
||||
float Rainfall;
|
||||
float Snowfall;
|
||||
float Pressure;
|
||||
int Cloudcover;
|
||||
int Visibility;
|
||||
int Sunrise;
|
||||
int Sunset;
|
||||
int Timezone;
|
||||
} Forecast_record_type;
|
||||
|
||||
#endif /* ifndef FORECAST_RECORD_H_ */
|
||||
@@ -0,0 +1,70 @@
|
||||
#define FONT(x) x##_tf
|
||||
|
||||
// Temperature - Humidity - Forecast
|
||||
const String TXT_FORECAST_VALUES = "3-Day Forecast Values";
|
||||
const String TXT_CONDITIONS = "Conditions";
|
||||
const String TXT_DAYS = "(Days)";
|
||||
const String TXT_TEMPERATURES = "Temperature";
|
||||
const String TXT_TEMPERATURE_C = "Temperature (*C)";
|
||||
const String TXT_TEMPERATURE_F = "Temperature (*F)";
|
||||
const String TXT_HUMIDITY_PERCENT = "Humidity (%)";
|
||||
|
||||
// Pressure
|
||||
const String TXT_PRESSURE = "Pressure";
|
||||
const String TXT_PRESSURE_HPA = "Pressure (hpa)";
|
||||
const String TXT_PRESSURE_IN = "Pressure (in)";
|
||||
const String TXT_PRESSURE_STEADY = "Steady";
|
||||
const String TXT_PRESSURE_RISING = "Rising";
|
||||
const String TXT_PRESSURE_FALLING = "Falling";
|
||||
|
||||
// RainFall / SnowFall
|
||||
const String TXT_RAINFALL_MM = "Rainfall (mm)";
|
||||
const String TXT_RAINFALL_IN = "Rainfall (in)";
|
||||
const String TXT_SNOWFALL_MM = "Snowfall (mm)";
|
||||
const String TXT_SNOWFALL_IN = "Snowfall (in)";
|
||||
const String TXT_PRECIPITATION_SOON = "Prec.";
|
||||
|
||||
// Sun
|
||||
const String TXT_SUNRISE = "Sunrise";
|
||||
const String TXT_SUNSET = "Sunset";
|
||||
|
||||
// Moon
|
||||
const String TXT_MOON_NEW = "New";
|
||||
const String TXT_MOON_WAXING_CRESCENT = "Waxing Crescent";
|
||||
const String TXT_MOON_FIRST_QUARTER = "First Quarter";
|
||||
const String TXT_MOON_WAXING_GIBBOUS = "Waxing Gibbous";
|
||||
const String TXT_MOON_FULL = "Full";
|
||||
const String TXT_MOON_WANING_GIBBOUS = "Waning Gibbous";
|
||||
const String TXT_MOON_THIRD_QUARTER = "Third Quarter";
|
||||
const String TXT_MOON_WANING_CRESCENT = "Waning Crescent";
|
||||
|
||||
// Power / WiFi
|
||||
const String TXT_POWER = "Power";
|
||||
const String TXT_WIFI = "WiFi";
|
||||
const char* TXT_UPDATED = "Updated:";
|
||||
|
||||
// Wind
|
||||
const String TXT_WIND_SPEED_DIRECTION = "Wind Speed/Direction";
|
||||
const String TXT_N = "N";
|
||||
const String TXT_NNE = "NNE";
|
||||
const String TXT_NE = "NE";
|
||||
const String TXT_ENE = "ENE";
|
||||
const String TXT_E = "E";
|
||||
const String TXT_ESE = "ESE";
|
||||
const String TXT_SE = "SE";
|
||||
const String TXT_SSE = "SSE";
|
||||
const String TXT_S = "S";
|
||||
const String TXT_SSW = "SSW";
|
||||
const String TXT_SW = "SW";
|
||||
const String TXT_WSW = "WSW";
|
||||
const String TXT_W = "W";
|
||||
const String TXT_WNW = "WNW";
|
||||
const String TXT_NW = "NW";
|
||||
const String TXT_NNW = "NNW";
|
||||
|
||||
// Day of the week
|
||||
const char* weekday_D[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
|
||||
|
||||
// Month
|
||||
const char* month_M[]
|
||||
= { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
||||
@@ -0,0 +1,2 @@
|
||||
// weather.cpp is the actual main file,
|
||||
// this is just for Arduino to recognize this as a project.
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,49 @@
|
||||
const bool DebugDisplayUpdate = false;
|
||||
|
||||
// Change to your WiFi credentials
|
||||
const char* ssid = "";
|
||||
const char* password = "";
|
||||
|
||||
// Use your own API key by signing up for a free developer account at https://openweathermap.org/
|
||||
String apikey = ""; // See: https://openweathermap.org/
|
||||
const char server[] = "api.openweathermap.org";
|
||||
// http://api.openweathermap.org/data/2.5/forecast?q=Melksham,UK&APPID=your_OWM_API_key&mode=json&units=metric&cnt=40
|
||||
// http://api.openweathermap.org/data/2.5/weather?q=Melksham,UK&APPID=your_OWM_API_key&mode=json&units=metric&cnt=1
|
||||
// Set your location according to OWM locations
|
||||
String City = "KIEV"; // Your home city See: http://bulk.openweathermap.org/sample/
|
||||
String Country = "UA"; // Your _ISO-3166-1_two-letter_country_code country code, on OWM find your
|
||||
// nearest city and the country code is displayed
|
||||
// https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
|
||||
String Language
|
||||
= "EN"; // NOTE: Only the weather description is translated by OWM
|
||||
// Examples: Arabic (AR) Czech (CZ) English (EN) Greek (EL) Persian(Farsi) (FA)
|
||||
// Galician (GL) Hungarian (HU) Japanese (JA) Korean (KR) Latvian (LA) Lithuanian (LT)
|
||||
// Macedonian (MK) Slovak (SK) Slovenian (SL) Vietnamese (VI)
|
||||
String Hemisphere = "north"; // or "south"
|
||||
String Units = "M"; // Use 'M' for Metric or I for Imperial
|
||||
const char* Timezone
|
||||
= "EET-2EEST,M3.5.0/3,M10.5.0/4"; // Choose your time zone from:
|
||||
// https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv
|
||||
// See below for examples
|
||||
const char* ntpServer
|
||||
= "pool.ntp.org"; // Or, choose a time server close to you, but in most cases it's best to use
|
||||
// pool.ntp.org to find an NTP server then the NTP system decides e.g.
|
||||
// 0.pool.ntp.org, 1.pool.ntp.org as the NTP syem tries to find the closest
|
||||
// available servers EU "0.europe.pool.ntp.org" US
|
||||
// "0.north-america.pool.ntp.org" See: https://www.ntppool.org/en/
|
||||
int gmtOffset_sec = 0; // UK normal time is GMT, so GMT Offset is 0, for US (-5Hrs) is typically
|
||||
// -18000, AU is typically (+8hrs) 28800
|
||||
int daylightOffset_sec
|
||||
= 3600; // In the UK DST is +1hr or 3600-secs, other countries may use 2hrs 7200 or 30-mins
|
||||
// 1800 or 5.5hrs 19800 Ahead of GMT use + offset behind - offset
|
||||
|
||||
// Example time zones
|
||||
// const char* Timezone = "MET-1METDST,M3.5.0/01,M10.5.0/02"; // Most of Europe
|
||||
// const char* Timezone = "CET-1CEST,M3.5.0,M10.5.0/3"; // Central Europe
|
||||
// const char* Timezone = "EST-2METDST,M3.5.0/01,M10.5.0/02"; // Most of Europe
|
||||
// const char* Timezone = "EST5EDT,M3.2.0,M11.1.0"; // EST USA
|
||||
// const char* Timezone = "CST6CDT,M3.2.0,M11.1.0"; // CST USA
|
||||
// const char* Timezone = "MST7MDT,M4.1.0,M10.5.0"; // MST USA
|
||||
// const char* Timezone = "NZST-12NZDT,M9.5.0,M4.1.0/3"; // Auckland
|
||||
// const char* Timezone = "EET-2EEST,M3.5.5/0,M10.5.5/0"; // Asia
|
||||
// const char* Timezone = "ACST-9:30ACDT,M10.1.0,M4.1.0/3": // Australia
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
# ESP-IDF Partition Table
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
nvs, data, nvs, 0x9000, 0x6000,
|
||||
phy_init, data, phy, 0xf000, 0x1000,
|
||||
factory, app, factory, 0x10000, 3M,
|
||||
|
@@ -0,0 +1 @@
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
Reference in New Issue
Block a user