user62267: I'm making a cryptocurrency ticker using NodeMCU ESP8266 and have this code so far,  I don't know how to configure a dot matrix led 4 segments of 8*8 each with this particular code. The only thing I need is correction is the initialization of the display. 
Here's the code:
/*******************************************************************
    A project to display crypto currency prices using an ESP8266

    Main Hardware:
    - NodeMCU Development Board (Any ESP8266 dev board will work)
    - dot matrix led 4 segments of 8*8

    Written by Brian Lough
    https://www.youtube.com/channel/UCezJOfu7OtqGzd5xrP3q6WA
 *******************************************************************/

// ----------------------------
// Standard Libraries - Already Installed if you have ESP8266 set up
// ----------------------------

#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <Wire.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#define MATRIX32
#include  <SPI.h>

// ----------------------------
// Additional Libraries - each one of these will need to be installed.
// ----------------------------

#include <CoinMarketCapApi.h>
// For Integrating with the CoinMarketCap.com API
// Available on the library manager (Search for "CoinMarket")
// https://github.com/witnessmenow/arduino-coinmarketcap-api

//#include "SH1106.h"
// The driver for the OLED display
// Available on the library manager (Search for "oled ssd1306")
// https://github.com/squix78/esp8266-oled-ssd1306

#include <ArduinoJson.h>
// !! NOTE !!: When installing this select an older version than V6 from the drop down
// Required by the CoinMarketCapApi Library for parsing the response
// Available on the library manager (Search for "arduino json")
// https://github.com/squix78/esp8266-oled-ssd1306


// ----------------------------
// Configurations - Update these
// ----------------------------

char ssid[] = "rum1";       // your network SSID (name)
char password[] = "@@mywifi34@@";  // your network key

// Pins based on your wiring
#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA PIN 11
#define CS_PIN 10

//#define SCL_PIN D5
//#define SDA_PIN D4

// CoinMarketCap's limit is "no more than 10 per minute"
// Make sure to factor in if you are requesting more than one coin.
// We'll request a new value just before we change the screen so it's the most up to date
unsigned long screenChangeDelay = 10000; // Every 10 seconds

// Have tested up to 10, can probably do more
#define MAX_HOLDINGS 10

#define CURRENCY "eur" //See CoinMarketCap.com for currency options (usd, gbp etc)
#define CURRENCY_SYMBOL "E" // Euro doesn't seem to work, $ and £ do

// You also need to add your crypto currecnies in the setup function

// ----------------------------
// End of area you need to change
// ----------------------------


WiFiClientSecure client;
CoinMarketCapApi api(client);

display.begin(CS_PIN, MAX_DEVICES);

MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);

//MD_Parola.h display(0x3c, SDA_PIN, SCL_PIN);

unsigned long screenChangeDue;

struct Holding {
  String tickerId;
  float amount;
  bool inUse;
  CMCTickerResponse lastResponse;
};

Holding holdings[MAX_HOLDINGS];

int currentIndex = -1;
String ipAddressString;

void addNewHolding(String tickerId, float amount = 0) {
  int index = getNextFreeHoldingIndex();
  if (index > -1) {
    holdings[index].tickerId = tickerId;
    holdings[index].amount = amount;
    holdings[index].inUse = true;
  }
}

void setup() {

  Serial.begin(115200);

  // ----------------------------
  // Holdings - Add your currencies here
  // ----------------------------
  // Go to the currencies coinmarketcap.com page
  // and take the tickerId from the URL (use bitcoin or ethereum as an example)

  addNewHolding("bitcoin");
  addNewHolding("dogecoin");
  addNewHolding("ethereum");

  // ----------------------------
  // Everything below can be thinkered with if you want but should work as is!
  // ----------------------------

  // Initialising the display
  display.init();
  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.setFont(ArialMT_Plain_16);
  display.drawString(64, 0, F("HODL Display"));
  display.setFont(ArialMT_Plain_10);
  display.drawString(64, 18, F("By Brian Lough"));
  display.display();


  // Set WiFi to station mode and disconnect from an AP if it was Previously
  // connected
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);

  // Attempt to connect to Wifi network:
  Serial.print("Connecting Wifi: ");
  Serial.println(ssid);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  IPAddress ip = WiFi.localIP();
  Serial.println(ip);
  ipAddressString = ip.toString();
}

int getNextFreeHoldingIndex() {
  for (int i = 0; i < MAX_HOLDINGS; i++) {
    if (!holdings[i].inUse) {
      return i;
    }
  }

  return -1;
}

int getNextIndex() {
  for (int i = currentIndex + 1; i < MAX_HOLDINGS; i++) {
    if (holdings[i].inUse) {
      return i;
    }
  }

  for (int j = 0; j <= currentIndex; j++) {
    if (holdings[j].inUse) {
      return j;
    }
  }

  return -1;
}

void displayHolding(int index) {

  CMCTickerResponse response = holdings[index].lastResponse;

  display.clear();

  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.setFont(ArialMT_Plain_16);
  display.drawString(64, 0, response.symbol);
  display.setFont(ArialMT_Plain_24);
  double price = response.price_currency;
  if (price == 0) {
    price = response.price_usd;
  }
  display.drawString(64, 20, formatCurrency(price));
  display.setFont(ArialMT_Plain_16);
//  display.setTextAlignment(TEXT_ALIGN_CENTER);
//  display.drawString(64, 48, " 1h:" + String(response.percent_change_1h) + "%");
  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.drawString(64, 48, "24h: " + String(response.percent_change_24h) + "%");

  display.display();
}

void displayMessage(String message){
  display.clear();
  display.setFont(ArialMT_Plain_10);
  display.setTextAlignment(TEXT_ALIGN_LEFT);
  display.drawStringMaxWidth(0, 0, 128, message);
  display.display();
}

String formatCurrency(float price) {
  String formattedCurrency = CURRENCY_SYMBOL;
  int pointsAfterDecimal = 6;
  if (price > 100) {
    pointsAfterDecimal = 2;
  } else if (price > 1) {
    pointsAfterDecimal = 4;
  }
  formattedCurrency.concat(String(price, pointsAfterDecimal));
  return formattedCurrency;
}

bool loadDataForHolding(int index) {
  int nextIndex = getNextIndex();
  if (nextIndex > -1 ) {
    holdings[index].lastResponse = api.GetTickerInfo(holdings[index].tickerId, CURRENCY);
    return holdings[index].lastResponse.error == "";
  }

  return false;
}

void loop() {
  unsigned long timeNow = millis();
  if ((timeNow > screenChangeDue))  {
    currentIndex = getNextIndex();
    if (currentIndex > -1) {
      if (loadDataForHolding(currentIndex)) {
        displayHolding(currentIndex);
      } else {
        displayMessage(F("Error loading data."));
      }
    } else {
      displayMessage(F("No funds to display. Edit the setup to add them"));
    }
    screenChangeDue = timeNow + screenChangeDelay;
  }
}

And here's the error:
crytodisplayDraft1:82:1: error: 'display' does not name a type

 display.begin(CS_PIN, MAX_DEVICES);

 ^

C:\Users\SUDU0005\Documents\Arduino\crytodisplayDraft1\crytodisplayDraft1.ino: In function 'void setup()':

crytodisplayDraft1:130:3: error: 'display' was not declared in this scope

   display.init();

   ^

crytodisplayDraft1:131:28: error: 'TEXT_ALIGN_CENTER' was not declared in this scope

   display.setTextAlignment(TEXT_ALIGN_CENTER);

                            ^

crytodisplayDraft1:132:19: error: 'ArialMT_Plain_16' was not declared in this scope

   display.setFont(ArialMT_Plain_16);

                   ^

crytodisplayDraft1:134:19: error: 'ArialMT_Plain_10' was not declared in this scope

   display.setFont(ArialMT_Plain_10);

                   ^

C:\Users\SUDU0005\Documents\Arduino\crytodisplayDraft1\crytodisplayDraft1.ino: In function 'void displayHolding(int)':

crytodisplayDraft1:191:3: error: 'display' was not declared in this scope

   display.clear();

   ^

crytodisplayDraft1:193:28: error: 'TEXT_ALIGN_CENTER' was not declared in this scope

   display.setTextAlignment(TEXT_ALIGN_CENTER);

                            ^

crytodisplayDraft1:194:19: error: 'ArialMT_Plain_16' was not declared in this scope

   display.setFont(ArialMT_Plain_16);

                   ^

crytodisplayDraft1:196:19: error: 'ArialMT_Plain_24' was not declared in this scope

   display.setFont(ArialMT_Plain_24);

                   ^

C:\Users\SUDU0005\Documents\Arduino\crytodisplayDraft1\crytodisplayDraft1.ino: In function 'void displayMessage(String)':

crytodisplayDraft1:212:3: error: 'display' was not declared in this scope

   display.clear();

   ^

crytodisplayDraft1:213:19: error: 'ArialMT_Plain_10' was not declared in this scope

   display.setFont(ArialMT_Plain_10);

                   ^

crytodisplayDraft1:214:28: error: 'TEXT_ALIGN_LEFT' was not declared in this scope

   display.setTextAlignment(TEXT_ALIGN_LEFT);

                            ^

Multiple libraries were found for "Wire.h"
 Använd: C:\Users\SUDU0005\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\Wire
Oanvänd: C:\Users\SUDU0005\Documents\Arduino\libraries\Wire
exit status 1
'display' does not name a type

So, how do I configure the display? 

user60552: First and major point, is that if you want to repeat existing device, then you have wrong hardware. Comments in the code tell us:
 Main Hardware:
- NodeMCU Development Board (Any ESP8266 dev board will work)
- **OLED I2C Display (SH1106)**

You have dot matrix display with MAX7219 chip (most likely), which uses completely different library to work with. Microcontrollers are not like PCs, if you change a display, you should seriously rework the code. All code like display.something() has to be re-written. MD_Parola seems to be a library for interfacing your dot matrix display. You instantiate an object of that library: MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES); but then never use created object P anywhere (also, this a bad name for an object. display or matrix are much better). Instead, code uses object display, which is never created - that's exactly what compiler is trying to tell you:
error: 'display' was not declared in this scope

So. to summarize: in order to change your code, you have to study MD_Parola lib, and seriously change all functions related to display. Obviously, that's beyond a scope of a simple question...

62267: <p>I'm making a cryptocurrency ticker using NodeMCU ESP8266 and have this code so far,  I don't know how to configure a dot matrix led 4 segments of 8*8 each with this particular code. The only thing I need is correction is the initialization of the display. </p>

<p>Here's the code:</p>

<pre><code>/*******************************************************************
    A project to display crypto currency prices using an ESP8266

    Main Hardware:
    - NodeMCU Development Board (Any ESP8266 dev board will work)
    - dot matrix led 4 segments of 8*8

    Written by Brian Lough
    https://www.youtube.com/channel/UCezJOfu7OtqGzd5xrP3q6WA
 *******************************************************************/

// ----------------------------
// Standard Libraries - Already Installed if you have ESP8266 set up
// ----------------------------

#include &lt;ESP8266WiFi.h&gt;
#include &lt;WiFiClientSecure.h&gt;
#include &lt;Wire.h&gt;
#include &lt;MD_Parola.h&gt;
#include &lt;MD_MAX72xx.h&gt;
#define MATRIX32
#include  &lt;SPI.h&gt;

// ----------------------------
// Additional Libraries - each one of these will need to be installed.
// ----------------------------

#include &lt;CoinMarketCapApi.h&gt;
// For Integrating with the CoinMarketCap.com API
// Available on the library manager (Search for "CoinMarket")
// https://github.com/witnessmenow/arduino-coinmarketcap-api

//#include "SH1106.h"
// The driver for the OLED display
// Available on the library manager (Search for "oled ssd1306")
// https://github.com/squix78/esp8266-oled-ssd1306

#include &lt;ArduinoJson.h&gt;
// !! NOTE !!: When installing this select an older version than V6 from the drop down
// Required by the CoinMarketCapApi Library for parsing the response
// Available on the library manager (Search for "arduino json")
// https://github.com/squix78/esp8266-oled-ssd1306


// ----------------------------
// Configurations - Update these
// ----------------------------

char ssid[] = "rum1";       // your network SSID (name)
char password[] = "@@mywifi34@@";  // your network key

// Pins based on your wiring
#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA PIN 11
#define CS_PIN 10

//#define SCL_PIN D5
//#define SDA_PIN D4

// CoinMarketCap's limit is "no more than 10 per minute"
// Make sure to factor in if you are requesting more than one coin.
// We'll request a new value just before we change the screen so it's the most up to date
unsigned long screenChangeDelay = 10000; // Every 10 seconds

// Have tested up to 10, can probably do more
#define MAX_HOLDINGS 10

#define CURRENCY "eur" //See CoinMarketCap.com for currency options (usd, gbp etc)
#define CURRENCY_SYMBOL "E" // Euro doesn't seem to work, $ and £ do

// You also need to add your crypto currecnies in the setup function

// ----------------------------
// End of area you need to change
// ----------------------------


WiFiClientSecure client;
CoinMarketCapApi api(client);

display.begin(CS_PIN, MAX_DEVICES);

MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);

//MD_Parola.h display(0x3c, SDA_PIN, SCL_PIN);

unsigned long screenChangeDue;

struct Holding {
  String tickerId;
  float amount;
  bool inUse;
  CMCTickerResponse lastResponse;
};

Holding holdings[MAX_HOLDINGS];

int currentIndex = -1;
String ipAddressString;

void addNewHolding(String tickerId, float amount = 0) {
  int index = getNextFreeHoldingIndex();
  if (index &gt; -1) {
    holdings[index].tickerId = tickerId;
    holdings[index].amount = amount;
    holdings[index].inUse = true;
  }
}

void setup() {

  Serial.begin(115200);

  // ----------------------------
  // Holdings - Add your currencies here
  // ----------------------------
  // Go to the currencies coinmarketcap.com page
  // and take the tickerId from the URL (use bitcoin or ethereum as an example)

  addNewHolding("bitcoin");
  addNewHolding("dogecoin");
  addNewHolding("ethereum");

  // ----------------------------
  // Everything below can be thinkered with if you want but should work as is!
  // ----------------------------

  // Initialising the display
  display.init();
  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.setFont(ArialMT_Plain_16);
  display.drawString(64, 0, F("HODL Display"));
  display.setFont(ArialMT_Plain_10);
  display.drawString(64, 18, F("By Brian Lough"));
  display.display();


  // Set WiFi to station mode and disconnect from an AP if it was Previously
  // connected
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);

  // Attempt to connect to Wifi network:
  Serial.print("Connecting Wifi: ");
  Serial.println(ssid);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  IPAddress ip = WiFi.localIP();
  Serial.println(ip);
  ipAddressString = ip.toString();
}

int getNextFreeHoldingIndex() {
  for (int i = 0; i &lt; MAX_HOLDINGS; i++) {
    if (!holdings[i].inUse) {
      return i;
    }
  }

  return -1;
}

int getNextIndex() {
  for (int i = currentIndex + 1; i &lt; MAX_HOLDINGS; i++) {
    if (holdings[i].inUse) {
      return i;
    }
  }

  for (int j = 0; j &lt;= currentIndex; j++) {
    if (holdings[j].inUse) {
      return j;
    }
  }

  return -1;
}

void displayHolding(int index) {

  CMCTickerResponse response = holdings[index].lastResponse;

  display.clear();

  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.setFont(ArialMT_Plain_16);
  display.drawString(64, 0, response.symbol);
  display.setFont(ArialMT_Plain_24);
  double price = response.price_currency;
  if (price == 0) {
    price = response.price_usd;
  }
  display.drawString(64, 20, formatCurrency(price));
  display.setFont(ArialMT_Plain_16);
//  display.setTextAlignment(TEXT_ALIGN_CENTER);
//  display.drawString(64, 48, " 1h:" + String(response.percent_change_1h) + "%");
  display.setTextAlignment(TEXT_ALIGN_CENTER);
  display.drawString(64, 48, "24h: " + String(response.percent_change_24h) + "%");

  display.display();
}

void displayMessage(String message){
  display.clear();
  display.setFont(ArialMT_Plain_10);
  display.setTextAlignment(TEXT_ALIGN_LEFT);
  display.drawStringMaxWidth(0, 0, 128, message);
  display.display();
}

String formatCurrency(float price) {
  String formattedCurrency = CURRENCY_SYMBOL;
  int pointsAfterDecimal = 6;
  if (price &gt; 100) {
    pointsAfterDecimal = 2;
  } else if (price &gt; 1) {
    pointsAfterDecimal = 4;
  }
  formattedCurrency.concat(String(price, pointsAfterDecimal));
  return formattedCurrency;
}

bool loadDataForHolding(int index) {
  int nextIndex = getNextIndex();
  if (nextIndex &gt; -1 ) {
    holdings[index].lastResponse = api.GetTickerInfo(holdings[index].tickerId, CURRENCY);
    return holdings[index].lastResponse.error == "";
  }

  return false;
}

void loop() {
  unsigned long timeNow = millis();
  if ((timeNow &gt; screenChangeDue))  {
    currentIndex = getNextIndex();
    if (currentIndex &gt; -1) {
      if (loadDataForHolding(currentIndex)) {
        displayHolding(currentIndex);
      } else {
        displayMessage(F("Error loading data."));
      }
    } else {
      displayMessage(F("No funds to display. Edit the setup to add them"));
    }
    screenChangeDue = timeNow + screenChangeDelay;
  }
}
</code></pre>

<p>And here's the error:</p>

<pre><code>crytodisplayDraft1:82:1: error: 'display' does not name a type

 display.begin(CS_PIN, MAX_DEVICES);

 ^

C:\Users\SUDU0005\Documents\Arduino\crytodisplayDraft1\crytodisplayDraft1.ino: In function 'void setup()':

crytodisplayDraft1:130:3: error: 'display' was not declared in this scope

   display.init();

   ^

crytodisplayDraft1:131:28: error: 'TEXT_ALIGN_CENTER' was not declared in this scope

   display.setTextAlignment(TEXT_ALIGN_CENTER);

                            ^

crytodisplayDraft1:132:19: error: 'ArialMT_Plain_16' was not declared in this scope

   display.setFont(ArialMT_Plain_16);

                   ^

crytodisplayDraft1:134:19: error: 'ArialMT_Plain_10' was not declared in this scope

   display.setFont(ArialMT_Plain_10);

                   ^

C:\Users\SUDU0005\Documents\Arduino\crytodisplayDraft1\crytodisplayDraft1.ino: In function 'void displayHolding(int)':

crytodisplayDraft1:191:3: error: 'display' was not declared in this scope

   display.clear();

   ^

crytodisplayDraft1:193:28: error: 'TEXT_ALIGN_CENTER' was not declared in this scope

   display.setTextAlignment(TEXT_ALIGN_CENTER);

                            ^

crytodisplayDraft1:194:19: error: 'ArialMT_Plain_16' was not declared in this scope

   display.setFont(ArialMT_Plain_16);

                   ^

crytodisplayDraft1:196:19: error: 'ArialMT_Plain_24' was not declared in this scope

   display.setFont(ArialMT_Plain_24);

                   ^

C:\Users\SUDU0005\Documents\Arduino\crytodisplayDraft1\crytodisplayDraft1.ino: In function 'void displayMessage(String)':

crytodisplayDraft1:212:3: error: 'display' was not declared in this scope

   display.clear();

   ^

crytodisplayDraft1:213:19: error: 'ArialMT_Plain_10' was not declared in this scope

   display.setFont(ArialMT_Plain_10);

                   ^

crytodisplayDraft1:214:28: error: 'TEXT_ALIGN_LEFT' was not declared in this scope

   display.setTextAlignment(TEXT_ALIGN_LEFT);

                            ^

Multiple libraries were found for "Wire.h"
 Använd: C:\Users\SUDU0005\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.6.3\libraries\Wire
Oanvänd: C:\Users\SUDU0005\Documents\Arduino\libraries\Wire
exit status 1
'display' does not name a type
</code></pre>

<p>So, how do I configure the display? </p>
 60552: <p>First and major point, is that if you want to repeat existing device, then you have wrong hardware. Comments in the code tell us:</p>

<pre><code> Main Hardware:
- NodeMCU Development Board (Any ESP8266 dev board will work)
- **OLED I2C Display (SH1106)**
</code></pre>

<p>You have dot matrix display with MAX7219 chip (most likely), which uses completely different library to work with. Microcontrollers are not like PCs, if you change a display, you should seriously rework the code. All code like <code>display.something()</code> has to be re-written. MD_Parola seems to be a library for interfacing your dot matrix display. You instantiate an object of that library: <code>MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);</code> but then never use created object <code>P</code> anywhere (also, this a bad name for an object. <code>display</code> or <code>matrix</code> are much better). Instead, code uses object <code>display</code>, which is never created - that's exactly what compiler is trying to tell you:</p>

<pre><code>error: 'display' was not declared in this scope
</code></pre>

<p>So. to summarize: in order to change your code, you have to study MD_Parola lib, and seriously change all functions related to display. Obviously, that's beyond a scope of a simple question...</p>
