Hi I need some help here,

I'm currently doing a school project that requires us to replace Arduino Uno to NodeMCU, I understand the hardware pin configuration is different, and I also found a code shared by JordanLui on the Arduino forum, and I don't think there is an issue with the code, but I constantly encounter this error when compiling with other program as well. Can you tell me where is the issue from?

Program code:

// Code from Arduino Forum https://forum.arduino.cc/index.php?topic=217394.0
// Modified to a Serial Output

#include <Wire.h>
#include <WireExt.h>

#define D6T_addr 0x0A // Address of OMRON D6T is 0x0A in hex
#define D6T_cmd 0x4C // Standard command is 4C in hex

int rbuf[35]; // Actual raw data is coming in as 35 bytes. Hence the needed         for WireExt so that we can handle more than 32 bytes
int tdata[16]; // The data comming from the sensor is 16 elements, in a 16x1     array
float t_PTAT;

void setup()

 pinMode(13, OUTPUT);

void loop()
 int i;


     if (WireExt.beginReception(D6T_addr) >= 0) {
       i = 0;
       for (i = 0; i < 35; i++) {
     rbuf[i] = WireExt.get_byte();

   t_PTAT = (rbuf[0]+(rbuf[1]<<8))*0.1; // Unclear what this is used for. It's not called elsewhere
   for (i = 0; i < 16; i++) {

  // Data is captured into tdata. This should be a 16x1 data. For now we can     output as a csv string which we can import to Matlab to sequence
     for (i=0; i<16; i++) {


Error Message:

Arduino: 1.8.10 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0x7855fb]

goroutine 1 [running]: github.com/arduino/arduino-cli/legacy/builder.ResolveLibrary(0x11ce45a0, 0x11eb4381, 0x9, 0x11eb4381) /home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/resolve_library.go:64 +0x14b github.com/arduino/arduino-cli/legacy/builder.findIncludesUntilDone(0x11ce45a0, 0x11cce3c0, 0x88ed00, 0x11c95530, 0x11c06150, 0x11d4e000, 0x0) /home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/container_find_includes.go:358 +0x3b6 github.com/arduino/arduino-cli/legacy/builder.(*ContainerFindIncludes).Run(0xdebc68, 0x11ce45a0, 0xdebc68, 0x0) /home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/container_find_includes.go:152 +0x3e5 github.com/arduino/arduino-cli/legacy/builder.runCommands(0x11ce45a0, 0x11c3de1c, 0x20, 0x20, 0x409a01, 0xf, 0x0) /home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:210 +0xbd github.com/arduino/arduino-cli/legacy/builder.(*Builder).Run(0x11c7bf40, 0x11ce45a0, 0xdebbb4, 0x11c4cc90) /home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:117 +0xb9c github.com/arduino/arduino-cli/legacy/builder.RunBuilder(...) /home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:226 main.main() /home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-builder/main.go:398 +0x6d2 C:\Program Files (x86)\Arduino\arduino-builder returned 2 Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.