Serveradresse auf iot.rlp.schule setzen.

This commit is contained in:
Christian Meyer 2023-07-18 11:10:46 +02:00
parent e1e2634801
commit 445e3e2103

View File

@ -746,7 +746,7 @@ namespace grove {
/** /**
* Send data to ThinkSpeak * Send data to ThinkSpeak
*/ */
//% block="Send Data to your ThinkSpeak Channel|Write API Key %apiKey|Field1 %field1|Field2 %field2|Field3 %field3|Field4 %field4|Field5 %field5|Field6 %field6|Field7 %field7|Field8 %field8" //% block="Send Data to your ThingSpeak Channel|Write API Key %apiKey|Field1 %field1|Field2 %field2|Field3 %field3|Field4 %field4|Field5 %field5|Field6 %field6|Field7 %field7|Field8 %field8"
//% group="UartWiFi" //% group="UartWiFi"
//% apiKey.defl="your Write API Key" //% apiKey.defl="your Write API Key"
export function sendToThinkSpeak(apiKey: string, field1: number, field2: number, field3: number, field4: number, field5: number, field6: number, field7: number, field8: number) { export function sendToThinkSpeak(apiKey: string, field1: number, field2: number, field3: number, field4: number, field5: number, field6: number, field7: number, field8: number) {
@ -762,7 +762,7 @@ namespace grove {
while (isWifiConnected && retry > 0) { while (isWifiConnected && retry > 0) {
retry = retry - 1; retry = retry - 1;
// establish TCP connection // establish TCP connection
sendAtCmd("AT+CIPSTART=\"TCP\",\"api.thingspeak.com\",80") sendAtCmd("AT+CIPSTART=\"TCP\",\"iot.rlp.schule\",80")
result = waitAtResponse("OK", "ALREADY CONNECTED", "ERROR", 2000) result = waitAtResponse("OK", "ALREADY CONNECTED", "ERROR", 2000)
if (result == 3) continue if (result == 3) continue