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:u7 [2019/08/11 15:19] – pczekalski | en:iot-open:remotelab:sut:generalpurpose2:u7 [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 60: | Line 60: | ||
| // MQTT messages | // MQTT messages | ||
| #define MQTTClientName " | #define MQTTClientName " | ||
| - | #define servoTopic ...<some topic for servo> | + | #define servoTopic ...<some topic for servo> |
| - | #define fanTopic | + | // i.e. including your name |
| + | #define fanTopic | ||
| + | // 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 136: | Line 140: | ||
| sprintf(buffer," | sprintf(buffer," | ||
| lcd.print(buffer); | lcd.print(buffer); | ||
| - | } | + | } // give it some unique topic i.e. including your name |
| } | } | ||
| </ | </ | ||
| Line 153: | Line 157: | ||
| === FAQ === | === FAQ === | ||
| **What is the valid range for controlling the fan?**: The fan is connected to the digital pin and controlled via PWM (12-bit resolution). Thus valid range is from 0 (min) to 4095 (max). Note rotation speed and airflow do not have linear characteristic vs PWM controlling value, So issuing 2047 on the GPIO pin controlling the fan won't make your fan to rotate 50% nor the airflow will be 50% of the maximum one. You need to experiment individually!\\ | **What is the valid range for controlling the fan?**: The fan is connected to the digital pin and controlled via PWM (12-bit resolution). Thus valid range is from 0 (min) to 4095 (max). Note rotation speed and airflow do not have linear characteristic vs PWM controlling value, So issuing 2047 on the GPIO pin controlling the fan won't make your fan to rotate 50% nor the airflow will be 50% of the maximum one. You need to experiment individually!\\ | ||
| - | **What is the valid range for controlling the servo?"" | + | **What is the valid range for controlling the servo?**: The valid range is from 0 to 90 degrees. Exceeding 90 degrees can break the construction! Never go beyond 90 degrees! |