ESP8266 constantly crashing when data from the SCD30 sensor is being outputted

  arduino, arduino-esp8266, arduino-ide, c++, esp8266

I am using the ESP8266 to read data from the grove SCD30 sensor.

When I upload the code, the sensor starts off fine, after a few returns from the sensor, the LED on the ESP stops flashing and stays lit.

The output on the serial monitor also stops outputting anything with no error.

#include "SCD30.h"

#if defined(ARDUINO_ARCH_AVR)
#pragma message("Defined architecture for ARDUINO_ARCH_AVR.")
#define SERIAL Serial
#elif defined(ARDUINO_ARCH_SAM)
#pragma message("Defined architecture for ARDUINO_ARCH_SAM.")
#define SERIAL SerialUSB
#elif defined(ARDUINO_ARCH_SAMD)
#pragma message("Defined architecture for ARDUINO_ARCH_SAMD.")
#define SERIAL SerialUSB
#elif defined(ARDUINO_ARCH_STM32F4)
#pragma message("Defined architecture for ARDUINO_ARCH_STM32F4.")
#define SERIAL SerialUSB
#pragma message("Not found any architecture.")
#define SERIAL Serial
void setup() {
  Wire.begin(D4, D5);
  Serial.println("SCD30 Raw Data");

void loop() {
  float result[3] = {0};
  if (scd30.isAvailable()) {
    SERIAL.print("Carbon Dioxide Concentration is: ");
    SERIAL.println(" ppm");
    SERIAL.println(" ");
    SERIAL.print("Temperature = ");
    SERIAL.println(" ℃");
    SERIAL.println(" ");
    SERIAL.print("Humidity = ");
    SERIAL.println(" %");
    SERIAL.println(" ");
    SERIAL.println(" ");
    SERIAL.println(" ");

The wiring is also not the problem as the sensor is being read at the start, but then crashes

The image shows that the last section of code ran, however, nothing comes after the "Humidity = 38.47 %"

enter image description here

Source: Windows Questions C++