ESP8266 Pins not declared

Hi,

I am currently trying to work myself into another persons arduino project using a ESP8266 module. The setup instructions to get everything working were:

  1. Install Arduino IDE http://www.arduino.cc

  2. Install https://github.com/esp8266/Arduino to add ESP8266 hardware support to Arduino IDE

  3. Download USB-UART driver at CP210x USB to UART Bridge VCP Drivers - Silicon Labs

  4. Did that, no problem

  5. I tried it using 'Additional board-manager URL' from the Arduino IDE Menu, but I only received an error stating that the json can not be downloaded. I suppose that does not work from behind a proxy. So I followed their manual guide "Using git version" and now I got the boards to choose from in the menu:

Strangely enough now I got the same boards twice in there. I cleared the 'Additional board-manager URL' and reloaded it but there are still 2.
3. Downloaded the zip and executed without errors

The big problem I am running into is that the code has several definitions of pins looking like this:

#define T_ENCODER_A D4

But when I try to test compile my source code I get the error:

error: 'D4' was not declared in this scope

 #define T_ENCODER_A D4

I know that the D4 corresponds to a certain GPOPin but I can not simply change the D4 to the corresponding pin because I first want to get everything running cleanly before I am modifying stuff.

Does anyone know how to fix the pin mapping issue for an ESP8266?

Which board do you have selected in the Tools > Board menu?

@pert
I tried all of the ones with ESP8266 in their name but the error stayed the same.

Ok, those are the mappings but somehow the creator of the thing got this to run with just the source code he gave me. So there has to be an external place where you need to set the mapping for your board in the IDE. How do I do that?

They are defined when you select a NodeMCU or Wemos D1 (mini) board.

Ok, this is now working but I get a new error:

class MQTTClient' has no member named 'onMessage'

   client.onMessage(messageReceived);

Apparently he is using this https://github.com/256dpi/arduino-mqtt library for mqtt.

The MQQTClient.h library is in there but there is no 'onMessage' method in there. Which method shall I use instead? This one?
setDefaultMessageHandler

I reinstalled everthing according to the other guys instructions. Main problem is that I do not have any clue what board he is using >.< . So if I choose the MCU0.9 the error with pins is resolved but I get the MQTT issue and if I select another of the boards on the list I keep getting the pin error. I attached the screenshot of all available boards.

Image 2018-01-02-003.jpg

faxe:
if I select another of the boards on the list I keep getting the pin error.

If you fixed the pin issue with those boards you'll end up with the MQTT issue also, it's not limited to that board. It's just that the compiler never gets that far because it hits the pin error first.