Read the statement by Michael Teeuw here.
MMM-cryptocurrency mods - help needed - noob status
-
Hi folks! Help a noob out pretty pls :-)
I’m putting together a Magic Mirror display for my Pi and want to include some crypto info on it. I’m using the MMM-cryptocurrency module to display a predefined list of coins (the coins are defined in the MM’s config.js file).### Setup
- data is fed to the module from an API to get the up to date prices etc
- the module then displays the list with 1 coin and the following info per line: logo, $ value, % change for last hr, day, week, and a little chart.
### Required Outcomes
As the list has quite a few coins on it, the list extends off the bottom of the screen and also interferes with the news ticker I have at the bottom of the screen. To fix this, I would like to have the module displayed in a way that:- shows 5 lines at a time,
*scrolls the entire list automatically,
*have a small white border around the module, say 2px in white.
I’m very new to MM and the involved languages so I’ve been going round in circles with Chat GPT and the like the last few days. The vast majority of the changes it suggests either doesn’t change anything, or it makes the list disappear completely.
I understand there’s some changes to be made to the module’s .js and .css files to set the “display area” and the scrolling behaviour for the module, specifically the getDom() function in the .js file, so I’ve been cutting out the relevant functions from the .js file and replacing them with the suggested functions from Chat GPT etc, saving and restarting MM, but as mentioned before, I’m not seeing any changes.
What do I need to be looking at and altering to achieve the required results please? Any pointers would be great :-) Cheers
-
@FuzzBeard that will be quite a challenge.
the easiest, maybe
is only process part of the returned list each time thru getDom()so you would have to start another interval timer
on a cycle of data_interval(numcryptos/display size)then change the loop control in getDom
wrapper.appendChild(tableHeader); for (i = 0; i < data.length; i++) { // - this line
to process the appropriate part of the data list