MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. raywo
    3. Best
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    R
    Offline
    • Profile
    • Following 0
    • Followers 3
    • Topics 4
    • Posts 49
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: p5.js and Magic Mirror

      @leejaeuk The getScript function is responsible for making p5.js available to your code. Thats why it reads like

      getScripts: function() {
          return [
            "https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.js"
          ];
        },
      

      Keep in mind that p5.js runs in the client. That’s why you need it in your module’s js file.

      The easiest way to incorporate your sound frequency code would be to insert it in the makeSketch function.

      makeSketch: function(conf) {
        return function(pFive) {
          YOUR CODE HERE
        }
      }
      

      Your code will have a setup and a draw function. These need to be prefixed with pFive. Just look at my code to get the idea.

      posted in General Discussion
      R
      raywo
    • RE: [MMM-FlightsAbove] Problem receiving and seing JSON from node_helper

      @E3V3A This function works just fine:

      radarPing: function () {
            radar(53.05959, 12.52388, 51.98161, 14.29552)
              .then((flights) => {
                this.sendSocketNotification("NEW_DATA", flights); //self?
                console.log("New radar data: ");
                console.log(flights);
              })
              .catch(function (error) {
                //console.log("ERROR:")
                console.log(error);
              });
          },
      

      It receives data, prints them on the mirror’s log and sends it to the module. The module is receiving the data and logs them to the browser’s console. And your table is populated too.

      posted in Development
      R
      raywo
    • RE: [MMM-NowPlayingOnSpotify] – Display the currently on Spotify playing song

      @goprojojo The width of the cover art is determined by the width of the column you placed the module in. It is set to 100%. You can change it by adjusting the width property of the .NPOS_albumCover class in css/styles.css.

      posted in Entertainment
      R
      raywo
    • 1
    • 2
    • 2 / 2