Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 445e3e2103 | |||
|
|
e1e2634801 |
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Seeed Studio
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
4
main.ts
4
main.ts
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user