Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.pioenvs
.piolibdeps
.clang_complete
.gcc-flags.json
.travis.yml
877 changes: 0 additions & 877 deletions ArialRounded.h

This file was deleted.

49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Please have a good look at the settings.h file. There you can:
* set your location for the weather information
* Set the clock mode: 12hour (am/pm) or 24hour mode
* Metric system for temperature
* Timezone and daytime saving options
* Time zone and daytime saving options
* API key for the wunderground service

## Wiring
Expand All @@ -56,3 +56,50 @@ Please have a good look at the settings.h file. There you can:
| D1 | CS |
| GND | GND |
| 3V3 | VCC |


## OTA Updating
There is OTA Web based updater built in, see settings.h
```c++
#define HOST "esp8266-MeteoStation"
#define UPDATE_PATH "/update"
#define UPDATE_USERNAME "admin"
#define UPDATE_PASSWORD "admin"
```

open browser and head to esp8266-MeteoStation/update or IP/update after entering correct username/password combination you will be able to load new firmware and update it remotely.
Keep in mind that overall sketch should be less than 50% of device memory.

## Handling multi language texts
There are language files containing strings which are used in UI.
There are still some strings hardcoded to the weather station library.
For now there is original English and Slovak file.
Just include the correct file at the top of code.
```c++
#include <language_EN.h>
```

As I am not able to reproduce steps for converting custom font files for extended language sets as Latin or Cyrillic, I used function to transliterate these characters which font cannot show to show basic version of there characters.

You can adjust your characters by editing array in function
```c++
String Translit(String str) {
String special[] = {"Ľ" , "Š" , "Č" , "Ť" , "Ž" , "Ý" , "Á" , "Í" , "É" , "Ô" ,
"Ď", "ľ" , "š" , "č" , "ť" , "ž" , "ý" , "á" , "í" , "é" , "ô", "ď" ,
"а","б","в","г","д","е","ё","ж","з","и","й","к","л","м","н","о","п","р","с",
"т","у","ф","х","ц","ч","ш","щ","ъ","ы","ь","э","ю","я","А","Б","В","Г","Д",
"Е","Ё","Ж","З","И","Й","К","Л","М","Н","О","П","Р","С","Т","У","Ф","Х","Ц",
"Ч","Ш","Щ","Ъ","Ы","Ь","Э","Ю","Я" };
String latin[] = {"L" , "S" , "C" , "T" , "Z" , "Y" , "A" , "I" , "E" , "O",
"D", "l" , "s" , "c" , "t" , "z" , "y" , "a" , "i" , "e" , "o","d" ,
"a","b","v","g","d","e","io","zh","z","i","y","k","l","m","n","o","p",
"r","s","t","u","f","h","ts","ch","sh","sht","a","i","y","e","yu","ya",
"A","B","V","G","D","E","Io","Zh","Z","I","Y","K","L","M","N","O","P",
"R","S","T","U","F","H","Ts","Ch","Sh","Sht","A","I","Y","e","Yu","Ya"};

for (int i = 0; i < (sizeof(special) / sizeof(special[0])) ; i++) {
str.replace(special[i],latin[i]);
}
return str;
}
```
36 changes: 36 additions & 0 deletions lib/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

This directory is intended for the project specific (private) libraries.
PlatformIO will compile them to static libraries and link to executable file.

The source code of each library should be placed in separate directory, like
"lib/private_lib/[here are source files]".

For example, see how can be organized `Foo` and `Bar` libraries:

|--lib
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |- readme.txt --> THIS FILE
|- platformio.ini
|--src
|- main.c

Then in `src/main.c` you should use:

#include <Foo.h>
#include <Bar.h>

// rest H/C/CPP code

PlatformIO will find your libraries automatically, configure preprocessor's
include paths and build them.

More information about PlatformIO Library Dependency Finder
- http://docs.platformio.org/page/librarymanager/ldf.html
17 changes: 17 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html

[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
lib_deps = ""
upload_port = COM[6]
upload_speed = 921600
Loading