This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:remotelab:sut:generalpurpose2:u8 [2019/08/11 08:11] – pczekalski | en:iot-open:remotelab:sut:generalpurpose2:u8 [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 54: | Line 54: | ||
| // MQTT messages | // MQTT messages | ||
| #define MQTTClientName ...<your client name> | #define MQTTClientName ...<your client name> | ||
| - | #define analogOutTopic | + | #define analogOutTopic |
| + | // i.e. including your name | ||
| //MQTT last will | //MQTT last will | ||
| - | #define lastWillTopic ...<some topic for exposing state and last will> | + | #define lastWillTopic ...<some topic for exposing state and last will> |
| + | | ||
| + | | ||
| #define lastWillMessage " | #define lastWillMessage " | ||
| #define mqttWelcomeMessage " | #define mqttWelcomeMessage " | ||
| Line 63: | Line 66: | ||
| == Step 3 == | == Step 3 == | ||
| - | Declare WiFiCilent, PubSubClient, | + | Declare WiFiCilent, PubSubClient, |
| == Step 4 == | == Step 4 == | ||
| Line 74: | Line 77: | ||
| if(client.connected()) | if(client.connected()) | ||
| { | { | ||
| - | client.publish(analogOutTopic, | + | client.publish(analogOutTopic, |
| + | // messages | ||
| } | } | ||
| } | } | ||
| Line 96: | Line 100: | ||
| } | } | ||
| </ | </ | ||
| - | <note warning> | + | <note warning> |
| + | <note tip>The '' | ||
| === Result validation === | === Result validation === | ||
| - | Observe connection progress on the LCD via video stream. Once WiFi and MQTT are connected you should be able to see analogue input readings on the LCD and additionally those should be sent over the MQTT messages to the MQTT broker. Connect your MQTT client and subscribe to your messages (you may do it using a wildcard character) i.e. with means of the MQTT spy application. Remember to connect MQTT spy to public IP address unless you're a student physically present in our laboratory room and you have direct access to the internal.IOT network. Observe data on the LCD screen the same as over MQTT messages (note, there may be a delay because of the network bottlenecks and MQTT broker load). | + | Observe connection progress on the LCD via video stream. Once WiFi and MQTT are connected, you should be able to see analogue input readings on the LCD, and additionally, those should be sent over the MQTT messages to the MQTT broker. Connect your MQTT client and subscribe to your messages (you may do it using a wildcard character), i.e. with means of the MQTT spy application. Remember to connect MQTT spy to public IP address unless you're a student physically present in our laboratory room and you have direct access to the internal.IOT network. Observe data on the LCD screen the same as over MQTT messages (note, there may be a delay because of the network bottlenecks and MQTT broker load). |
| === FAQ === | === FAQ === | ||
| - | This section is to be extended as new questions appear. \\ | + | **I want to implement PID controller |
| - | When using the printed version | + | |
| - | //Provide some FAQs in the following form:\\ | + | |
| - | **Question?**: Answer. | + | |
| - | // | + | |