Hi all. I need help adding cyrillic characters to this project GitHub - Lightwell-bg/LWClock: Multifunctional clock based on ESP8266 and MAX79xxx for Home Automation (IoT). I get a forecast from openweathermap in Ukrainian, but there are no symbols Ї, ї, І, і, Є, є, Ґ, ґ in the project
You will need to modify or replace one of the font files in the project. There are three of them, so first figure out how they are coded and used, and which one to modify.
Yes, I understand how to change the font file, how to add a character to it, but I don't understand how to force the weather output to use these characters
You also need to change the relevant print statements, which send the data and symbols to the display.
The most straightforward approach in cases like this is to substitute some character that you don't otherwise use, in both the font file and the print statement.
This is the problem. I do not know how to do that
Sorry. You are giving forum members nothing to work with.
Post a specific question about a specific line of code or two, and people will be glad to help. Keep in mind that it is extremely unlikely that anyone has your combination of components, so there is no way to test the code.
If you would rather have someone do the work for you, post on the Jobs and Paid Collaborations forum section.
I have a more general question. I can't figure out where the correspondence is set between, for example, the character 6, 124, 124, 33, 17, 124, 124, // 153 - Й in the font file and the Й character that the controller receives in the weather forecast
You have all the source code. It is straightforward to follow through all the function calls from data reception to data display.
There is a one to one correspondence between a print character, the font file and the pixels that end up being illuminated.
I just took a sample out of a font table LWClock/fonts_rus.h at master · Lightwell-bg/LWClock · GitHub
I did not look at the code.
5, 62, 81, 73, 69, 62, // 48 - '0'
3, 66, 127, 64, // 49 - '1'
5, 114, 73, 73, 73, 70, // 50 - '2'
5, 33, 65, 73, 77, 51, // 51 - '3'
5, 24, 20, 18, 127, 16, // 52 - '4'
5, 39, 69, 69, 69, 57, // 53 - '5'
5, 60, 74, 73, 73, 49, // 54 - '6'
5, 65, 33, 17, 9, 7, // 55 - '7'
5, 54, 73, 73, 73, 54, // 56 - '8'
5, 70, 73, 73, 41, 30, // 57 - '9'
. . .
10, 124, 4, 120, 4, 120, 124, 4, 120, 4, 120, // 196 - 'mm'
6, 96, 144, 143, 143, 149, 96, // 197 - 'Symbol Temp'
7, 48, 72, 134, 129, 134, 72, 48, // 198 - 'Symbol Hum'
8, 255, 193, 33, 50, 22, 20, 8, 8, // 199 - 'Symbol Wind'
7, 136, 144, 160, 255, 160, 144, 136, // 200 - 'Symbol Press'
10, 64, 176, 144, 136, 132, 132, 136, 132, 98, 28, // 201 - 'Symbol Sky
It looks like the first character is the font width.
The remaining characters appear a binary representation of each column of the font, but inverted.
So, for character '1' from the table entry: 3, 66, 127, 64, // 49 - '1'
3 = font width 3
66 = 01000010
127 = 01111111
64 = 01000000
rotate through 90 degrees anti clockwise:
010
110
010
010
010
010
111
000
which starts to look like a '1' with a base and a blank row at the bottom
The unlit pixels have the value 0.
EDIT
I found this: LED Matrix Editor
Maybe it helps but only for creating/visualising the font. You'd probably have to encode it manually.
Here is the '1' from the from the font table.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.