- Visit AzureIoTCentral and create a
new application
. - Select
Sample Devkits
- Add a new
mxchip
device. (real device) (Under theDevice Explorer
) - Browse into device window and click/open
Connect
on the top-right of the device screen - Grab
scopeId
,device Id
andprimary key
and fill the necessary parts underapp_main.cpp
// #define WIFI_SSID "<ENTER WIFI SSID HERE>"
// #define WIFI_PASSWORD "<ENTER WIFI PASSWORD HERE>"
// const char* scopeId = "<ENTER SCOPE ID HERE>";
// const char* deviceId = "<ENTER DEVICE ID HERE>";
// const char* deviceKey = "<ENTER DEVICE primary/secondary KEY HERE>";
Compile it! and deploy to your device. (see below)
- Use MBED online compiler
OR
- Install iotz from this link
-
- (update board name under
iotz.json
i.e. currently it's"target": "nucleo_l476rg"
)
- (update board name under
Setup the environment; (under the project folder)
iotz init
iotz export
Compile!
iotz make -j2
Upload
Copy the `.bin` file under the `BUILD` folder into your device (possibly an attached disk drive)
Monitoring?
npm install -g nodemcu-tool
Assuming the port/dev for the board is /dev/tty.usbxxxxxxx
nodemcu-tool -p /dev/tty.usbxxxxx -b 9600 terminal