You can then create an API key (a secure way of your mirror communicating with the service), which you need to specify here in ‘appid’. To get your own weather forecast, go to and register for a free account. In ‘config’ you have three pieces of information to complete. You have the option to change the title (maybe ‘Will it rain?’) and the position of the module on the screen. Let’s use the weather module as an example. Finally ‘config’ will contain information that is specific to that module. If a title is required, then ‘title’ allows you to change the text of the header. This controls where the module is displayed on the mirror. Most also require a ‘position’, which can be ‘top_bar’, ‘top_left’, ‘lower_third’, and many others. Each module has different requirements but each one requires a ‘module’ line like this: It is formatted in a JavaScript file. This is a very well-structured language but unforgiving. Your config file controls some of the fundamental features of your mirror, as well as the various modules. Pm2 restart MagicMirror Meet the config file If anything goes wrong, just copy the config backup back and try again:Įach time you edit config.js, you’ll need to restart MagicMirror2 for changes to take effect. If MagicMirror2 refuses to start, just copy the file back. Don’t worry: as long as you make copies of your files, it’s going to be hard to break anything. For now, you will need to do some text editing of config.js. Sadly, MagicMirror2 doesn’t (yet) come with an easy configuration utility. Now add this line to the end of the -output HDMI-1 -rotate right To rotate your display 90º so it fits your mirror, open a Terminal and enter the following: boot/config.txt to easily rotate the screen, but with Raspberry Pi 4’s fancy new graphics support, this is no longer possible. Follow our Build a magic mirror tutorial to get your own mirror up-and-running.Ĭan a mirror be upside-down? A magic mirror can! Most mirrors tend to be portrait, whereas screens are normally landscape. Building a magic mirror is one of the easiest, and most rewarding Raspberry Pi projects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |