-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
Paul Bock edited this page Jan 26, 2021
·
2 revisions
- Add the following URL to the Additional Board Managers URL in order to install the NodeMCU board
http://arduino.esp8266.com/stable/package_esp8266com_index.json
- Go to
Tools => Board => Boards Manager
, search forNodeMCU
, and install theesp8266
library, at this point in time, the version we are using is2.7.4
- Select the
NodeMCU 1.0 (ESP-12E Module)
board
NOTE If ANY libraries have external dependencies on other libraries and ask you if you would like to install those as well, make sure they are installed as well, otherwise you will have issues when you compile
- Install the
Adafruit ESP8266
library (currently using v1.1.0
(I think? Need to double check this)) - Install the
ArduinoMqttClient
library (currently using v0.1.5
) - Install the
DHT sensor library
library (currently using v1.4.1
)
-
SECRET_SSID
: The name of the network your device will connect to. -
SECRET_PASS
: The password of the network your device will connect to. -
SECRET_MQTT_USER
: The name of the MQTT user your device will connect as. -
SECRET_MQTT_PASS
: The password of the MQTT user your device will connect as.
-
DEVICE_LOCATION
: The location of the device, used for constructing MQTT topic, by default it is "". -
DHT_PIN
: The physical pin the DHT module is transmitting data to on the NodeMCU board, by default it is pinD5
. -
DHT_TYPE
: The type of DHT module being used with the NodeMCU board, by default it isDHT11
. -
LOOP_DELAY
: The number of time (in milliseconds) the loop will be delayed, by default it is5000
, or 5 seconds. -
MQTT_BROKER
: The address of the MQTT broker the device will publish to, by default it is "". -
MQTT_PORT
: The port number the MQTT broker is accepting connections, by default it is1883
. -
WIFI_SETUP_DELAY
: The number of time (in milliseconds) wifi setup must wait before attempting to connect again, by default it is500
or 0.5 seconds