Показаны различия между двумя версиями страницы.
Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версия | ||
products:laboratory_iot_c:exp67 [2024/12/05 17:51] – [Программный код эксперимента] labuser30 | products:laboratory_iot_c:exp67 [2024/12/16 15:00] (текущий) – [Программный код эксперимента] labuser30 | ||
---|---|---|---|
Строка 23: | Строка 23: | ||
if (http.begin(client, | if (http.begin(client, | ||
- | Serial.print(" | + | Serial.print(" |
int httpCode = http.GET(); | int httpCode = http.GET(); | ||
if (httpCode > 0) { | if (httpCode > 0) { | ||
- | Serial.printf(" | + | Serial.printf(" |
- | if (httpCode == HTTP_CODE_OK | + | if (httpCode == HTTP_CODE_OK) { |
String payload = http.getString(); | String payload = http.getString(); | ||
Serial.println(payload); | Serial.println(payload); | ||
} else { | } else { | ||
- | Serial.printf(" | + | Serial.printf(" |
} | } | ||
http.end(); | http.end(); | ||
Строка 59: | Строка 59: | ||
float temp = 22.9; | float temp = 22.9; | ||
- | httpGet(" | + | httpGet(" |
} | } | ||
Строка 80: | Строка 80: | ||
Теперь формируем адрес в интернете (URL), по которому мы будем обращаться с параметрами, | Теперь формируем адрес в интернете (URL), по которому мы будем обращаться с параметрами, | ||
<code arduino[enable_line_numbers=" | <code arduino[enable_line_numbers=" | ||
- | httpGet(" | + | httpGet(" |
</ | </ | ||