-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Swedish as language in rpi wordclock #214
Comments
Do you still need help? Please let me know if you need additional help. |
Yes I still need help, and I am very pleased if you would help me. |
Take a look here to understand how to use the development branch : For a quick overview how git works: To make a pull request you have to do the following steps:
Can you post a photo of your front layout? maybe i can help you. |
And of course we need all possible translations
etc for every 5 minutes steps. |
I have created a time_swedish.py -file. I have one question regarding this file. In german the time end with "UHR" this is not used in swedish, can i only remove these rows or do I hav to do someting elese also? time_swedish.txt I get this result when starting the clock, and it still run i german. pi@raspberrypi:~ $ sudo python3 rpi_ws281x/python/rpi_wordclock/wordclock.py
|
This is the front layout in swedish |
What is the output of ? In your time_swedish you can modify what you want to. Removing the lines of code is fine. To get the swedish language working you have to modify Add an import for your language Add an else statement for swedish (Line 114)
|
I have nov modified wordclock_display.py as you described. git status gives the following:pi@raspberrypi:~/rpi_ws281x $ git status Ospårade filer: inget köat för incheckning, men ospårade filer finns (spåra med "git add") If I stand in folder rpi_wordclockpi@raspberrypi:~/rpi_ws281x/python/rpi_wordclock $ git status Ändringar ej i incheckningskön: Ospårade filer: inga ändringar att checka in (använd "git add" och/eller "git commit -a")Do you want me to change to english or can you understand what i means? If I start the clock it still works in germanpi@raspberrypi:~ $ sudo python3 rpi_ws281x/python/rpi_wordclock/wordclock.py
|
Okay there are several problems. I will try to explain it step by step. 1. You dont need to checkout and compile the rpi_ws281x library Did you follow the python3 install instructions here ? 2. The wordclock repo is in the wrong path (will be fixed in step 3)
3. You have checked out the wrong repo as i thought
4. Before doing any changes
5. When noting helps
|
I am very greatful that you take the time to help me. I think I start from scratch on a new SD-card and follow your instructions. Is it possible to attach a .py-file here, I had to make it a txt-file to be able to attach it |
a text file is okay. I have commited your time_swedish changes in my branch. Seems to work 👍 When you re install everything you can checkout my swedish branch directly instead of bernds develop branch (Step 5). Later you can switch to bernds version again when the changes are merged. |
I feel that the success is coming closer! After switching off audio it all worked fine i german. Then I: And I got the following result I guess I did something wrong since I now have two folders. I understand that it must be frustrating trying to explain to a novice like me, how to perform the installation. My defence is that I am new to this and that I will be 70 in a few months and my brain perhaps works at a lower speed than earlier in life. |
70 ?? Stor respekt !Everything is fine now. When the clock works in german that is exactly what we wanted. You have two folder because you have used two different versions of the wordclock software. In the folder But for the moment you can use the software installed in the So all you have to do for now is:
Your cronjob entry should then look like that: |
Thank you for the encouraging comments! The clock is now working in Swedish!!! I found some mistakes in time_swedish.py that i have corrected. I try to understand how the plugins can be activated? Is it trigged by the pushbuttons and if so is this the only way to run them? Another question is how to connect to wifi if I make a clock to a friend. Can it be done from a PC or even a phone? |
The plugins can be activated by using the web interface. |
Okay great. Is now everything working as expected for swedish? Then i will as @bk1285 to merge your changes to the main repo. The Plugins can be activated in both ways (Buttons and via Web Interface). 1. Buttons
2. Web Interface
|
I have tried the Web interface and most of the plugins works great. The only real problem I have now is that the clock suddenly can switch to german layout and then later back again. It can also be flickering between the Swedish and German layouts. I do not know if this gives you an idea of the problem. pi@raspberrypi:~ $ sudo python3 rpi_wordclock_phenze/wordclock.py
|
Yes. Remember that you have to versions installed. Remember in your case you have to change the line: Change it and then after a restart everything should run fine. When adding anything to the crontab you dont have to manually start the wordclock. This will get startet automatically |
The plugins and the clock now works fine, but I found an error in time_swedish. Is there a better way to check that all times are correct than look at the clock for twelve hours? self.hours= [list(range(49,54)), |
You can use the simulator and set a time manually. You can send be a full list of possible time values an i will check it for you. All is need is what should be displayed in every 5 minute step. |
Hope that this is what you are looking for. I have typed it in next to the german equals. I have seen that hour "TOLV" is missing the "T" and that pixel 60 is on at some times and should never be on. This class returns a given time as words (string)::
|
I found some cosmetic changes that place the "I" closer to the different minutes. |
I think that I have solved the problems with "time_swedish", but it is difficult to check everything without spending a whole day in front of the clock. When I am now almost satisfied how the clock works I am looking for a safe way to copy/clone the SD-card. I have heard that som of these tools are dangerous to use. Do you know anything regarding EaseUS or any other tool? Uppdaterad fil. |
Nice to know the clock also speaks Swedish now! |
Is it possible to clone an SD-card including OS with Etcher? I tried using Copy using Raspberry Pi. It works but without OS as I understand it. I use Raspberry Pi Imager to install OS and language and wifi. It has an option #custom.img", is this a way to create a clone? |
With Etcher you clone the entire SD card. |
Etcher was the perfect tool for me and worked without any problems. I now have to finalize the mechanical build with a rusty steel frontplate. The only thing I miss is a light sensor controlling the LEDs. Is this an ongoing job? I am very greatful for all excellent support! |
Sorry i don't had a minute this weekend. I have checked your changes. Everything looks good now 👍 Well done. I will ask Bernd to merge it back in the development branch. I have a working light sensor. Needed code is already implemented. Then you can enable using the brightness sensor in the config file ( |
Excellent, du you also have info how to wire it?
Den mån 20 dec. 2021 07:42Pascal Henze ***@***.***> skrev:
… Sorry i don't had a minute this weekend.
I have checked your changes. Everything looks good now 👍 Well done. I
will ask Bernd to merge it back in the development branch.
I have a working light sensor. Needed code is already implemented.
All you have to do is to install a lux sensor (i have used tsl2561).
Then you can enable using the brightness sensor in the config file (use_brightness_sensor
= true)
For more inspiration :
#139 <#139>
#27 <#27>
—
Reply to this email directly, view it on GitHub
<#214 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWUDHRKRKTRORV6BWTSABLLUR3F7HANCNFSM5JCW7KVA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have finally got a 2561 board and have connected it. I changed in the config file to. Set the brightness of the display (between 1 and 255)brightness = 200 pi@raspberrypi:~/rpi_wordclock_phenze $ sudo python3 wordclock.py
What could be the problem? |
There is an error saying there is no hardware I2C. |
I get a little bit further but still no clock running. During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last):
|
It cannot find the sensor (at address 0x39). |
Could it be so that I have bought wrong type of lightsensor that is not working with Raspberry Pi? GY-2561 Helligkeits- Luminosity- IR Lux Sensor TSL2561 I2C ESP8266 ArduinoGY-2561 Helligkeits- Luminosity- IR Lux Sensor TSL2561 I2C ESP8266 Arduino |
Sensor should work. Additionaly: does your board have an ADDR pin? Is it left unconnected? |
My board do not have an ADDR pin. It has 4 pins 0V, 5V, SCL, GND. Do this mean that code is missing to ues teh TSL2561 sensor? |
The code you are using does support the sensor. |
Is it in the file plugin.py that I should make the changes? The file looks different from the file you have linked to and have no information about address. Copy of the rows regarding brightness sensor in my plugin.py:
|
You are apparently using a different branch than I was expecting. So, can you try the following:
This will list all I2C devices found. |
Thank you for trying to help me to solv the problem! This was the result. pi@raspberrypi:~ $ sudo apt-get install i2c-tools |
That is a step forward! |
Can you try to change |
Thank you very much! Thank you once again for excellent support! |
I am sorry to disturb you again! Everything worked fine so I did clone the SD card to have a backup. After the clone nothing worked as it should not even with the original SD card. I think I did it correctly using clone in balena Etcher. It looked as if I used the wrong SD as source since the last updates on where not done. I have now made the last updates again but nothing works, no LEDs are working. I get Low voltage warnings could that be the problem. pi@raspberrypi:~ $ sudo python3 rpi_wordclock_phenze/wordclock.py
pi@raspberrypi:~ $ |
The error message is Seems that there is some other process running on port 80. Did you install anything else ? Perhaps another instance of the software is running? |
I removed Crontab and started it manually. Then I did not get this error message but still no LEDs. pi@raspberrypi:~ $ sudo python3 rpi_wordclock_phenze/wordclock.py
|
Problem solved! |
Unfortunately that is most of the time the problem. |
Everything here is new to me. I very much like to build a word clock in swedish. I have the electronics and the mechnical build in place but I struggle with the software that I am new to, but do my best to understand. From reading about others having different problems I have managed to ge the clock running in german. I thougt that the easiest way would be to overwrite german parts with the swedish equals. I have a layout for a frontplate in swedish, what else do I have to look in to? I would be very pleased if I could get any help.
The text was updated successfully, but these errors were encountered: