iot-central-firmware/ESP8266
Oguz Bastemur 22ae8b80d7 esp8266: split twin callback for device settings and ease ESP WD 2019-06-21 11:16:17 -07:00
..
src esp8266: split twin callback for device settings and ease ESP WD 2019-06-21 11:16:17 -07:00
.gitignore update esp8266 project name to match default ino for Arduino IDE 2019-01-28 15:40:31 -08:00
ESP8266.ino esp8266: update iotc and improve sample (#65) 2019-04-17 19:31:21 -07:00
README.md esp8266: update iotc and improve sample (#65) 2019-04-17 19:31:21 -07:00
sketch.json mbedOS5 and ESP8266/ESP8285 support 2019-01-24 16:46:05 -08:00

README.md

ESP8266 basic example for Azure IoT Central

  • Visit AzureIoTCentral and create a new application.
  • Select Sample Devkits
  • Add a new mxchip device. (a real device) (under Device Explorer)
  • Browse into device UI (by clicking to name of the device under Device explorer)
  • Click/open Connect at top-right of the device UI
  • Grab scopeId, device Id and primary key and fill the necessary parts under ESP8266.ino
#define WIFI_SSID "<ENTER WIFI SSID HERE>"
#define WIFI_PASSWORD "<ENTER WIFI PASSWORD HERE>"

const char* SCOPE_ID = "<ENTER SCOPE ID HERE>";
const char* DEVICE_ID = "<ENTER DEVICE ID HERE>";
const char* DEVICE_KEY = "<ENTER DEVICE primary/secondary KEY HERE>";

Compile it! and deploy to your device. (see below)

  • Download Arduino-CLI from this link
  • FOR WINDOWS, use version 0.3.3 => download
  • FOR WINDOWS, you will need a driver for USB to UART
  • Add additional url to board manager in arduino-cli.yml (this is usually located in the same folder of CLI executable)
board_manager:
  additional_urls:
  - http://arduino.esp8266.com/stable/package_esp8266com_index.json

Setup the environment; (under the project folder)

arduino-cli-0.3.... core update-index
arduino-cli-0.3.... core install esp8266:esp8266
arduino-cli-0.3.... board attach esp8266:esp8266:nodemcu

Compile!

arduino-cli-0.3.... compile

Upload

arduino-cli-0.3.... upload -p <PORT / DEV?? i.e. => /dev/cu.SLAB_USBtoUART >

Monitoring?

npm install -g nodemcu-tool

Assuming the port/dev for the board is /dev/cu.SLAB_USBtoUART

nodemcu-tool -p /dev/cu.SLAB_USBtoUART -b 9600 terminal