'ArialMT_Plain_16' was not declared in this scope

I`m trying to compile a code using esp8266 and SSD1306.
And I use Adafruit_SSD1306.h library, but I get this error message

Whole code

#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ArduinoJson.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>

#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>
#include <splash.h>

#include <Wire.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

char* ssid = "e-Broad690vb3th";
const char* password = "422e6a59d2";

const String endpoint = "http://api.openweathermap.org/data/2.5/weather?q=chiba,jp&APPID=";
const String key = "e8b6ba7b9f80d5870b70b44a9c08da2d";

void setup() {
Serial.begin(115200);
display.clearDisplay();

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi..");
}
Serial.println("Connected to the WiFi network");

}

void loop() {
if ((WiFi.status() == WL_CONNECTED)) {
WiFiClient client;
HTTPClient http;
http.begin(client, endpoint + key); //URLを指定
int httpCode = http.GET(); //GETリクエストを送信

if (httpCode > 0) { //返答がある場合

  String payload = http.getString();  //返答(JSON形式)を取得
  Serial.println(httpCode);
  Serial.println(payload);

  //jsonオブジェクトの作成
  DynamicJsonBuffer jsonBuffer;
  String json = payload;
  JsonObject& weatherdata = jsonBuffer.parseObject(json);

//パースが成功したかどうかを確認
if (!weatherdata.success()) {
  Serial.println("parseObject() failed");
}

//各データを抜き出し
const char* weather = weatherdata["weather"][0]["main"].as<char*>();
const double temp = weatherdata["main"]["temp"].as<double>();

//LCDに表示
display.clearDisplay();//画面を消去
//天気を表示
display.setFont(ArialMT_Plain_16);
display.drawString(0, 0, weather);
//気温を表示
display.setFont(ArialMT_Plain_24);
String temp_str = String(temp - 273.15) + "°C";
display.drawString(20, 20, temp_str);
display.display();

}

else {
Serial.println("Error on HTTP request");
}

http.endRequest(); //Free the resources
}

delay(30000); //30秒おきに更新

}

@rabbit787, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the Installation & Troubleshooting category.

Please edit your post, select all code and click the </> button to apply so-called code tags and next save your post. It makes it easier to read, easier to copy and prevents the forum software from incorrect interpretation of the code.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.