Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: azure-iot-c-sdk-f767zi
Fork of samplemqtt by
main.cpp@0:9d223777f962, 2018-08-23 (annotated)
- Committer:
- XinZhangMS
- Date:
- Thu Aug 23 06:21:34 2018 +0000
- Revision:
- 0:9d223777f962
init
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| XinZhangMS | 0:9d223777f962 | 1 | #include "mbed-os/mbed.h" |
| XinZhangMS | 0:9d223777f962 | 2 | #include "iothub_client_sample_mqtt.h" |
| XinZhangMS | 0:9d223777f962 | 3 | |
| XinZhangMS | 0:9d223777f962 | 4 | Serial pc(USBTX, USBRX, 115200); |
| XinZhangMS | 0:9d223777f962 | 5 | DigitalOut led3(LED3); |
| XinZhangMS | 0:9d223777f962 | 6 | NetworkInterface* network; |
| XinZhangMS | 0:9d223777f962 | 7 | |
| XinZhangMS | 0:9d223777f962 | 8 | int main(void) |
| XinZhangMS | 0:9d223777f962 | 9 | { |
| XinZhangMS | 0:9d223777f962 | 10 | |
| XinZhangMS | 0:9d223777f962 | 11 | iothub_client_sample_mqtt_run(); |
| XinZhangMS | 0:9d223777f962 | 12 | while (true) |
| XinZhangMS | 0:9d223777f962 | 13 | { |
| XinZhangMS | 0:9d223777f962 | 14 | led3 = !led3; |
| XinZhangMS | 0:9d223777f962 | 15 | wait(10); |
| XinZhangMS | 0:9d223777f962 | 16 | |
| XinZhangMS | 0:9d223777f962 | 17 | } |
| XinZhangMS | 0:9d223777f962 | 18 | |
| XinZhangMS | 0:9d223777f962 | 19 | |
| XinZhangMS | 0:9d223777f962 | 20 | return 0; |
| XinZhangMS | 0:9d223777f962 | 21 | } |
| XinZhangMS | 0:9d223777f962 | 22 | |
| XinZhangMS | 0:9d223777f962 | 23 |
