Page 1 of 1

Adafruit IO

Posted: 12 February 2020, 23:36 PM
by kurakaira
Anyone used the Adafruit IO platform ?
io.adafruit.com
It looks like an easy way to interface to the internet .
I have a project that uses ZX40s as the heart and added a ESP8266 with the stock AT firmware , i am able to connect to io.adafruit.com with the AT commands , but cannot get the server to accept the data .
Any insight ?

Code: Select all

Const EndST as string = chr(13) & chr(10) ' ESP CR & LF
Const SSIDST as String = "Kairamonni"  
Const WifiKeyST as string = "Password"

Dim ESPsanomaST as BoundedString(255)
Dim ESPpituusB as byte


Debug.Print "AT" ; EndST;
Debug.Print "ATE0" ; EndST;  ' No echo
Debug.Print "AT+CWMODE=1" ; EndST;
Debug.Print "AT+CWJAP=" ; chr(34) ; SSIDST ; chr(34) ; "," ; chr(34) ; WifiKeyST ; chr(34) ; EndST;

Debug.Print "AT+CIPSTART=" ; chr(34) ; "TCP" ; chr(34) ; "," ; chr(34) ; "io.adafruit.com" ; chr(34) ; ",80" ; EndST; ' Connect 

ESPsanomaST = "GET /api/v2/KriPrak/feeds/bastu.1/data?limit=1&x-aio-key=aio_fPIO48jHefjE4lNhYSi HTTP/1.0" ' Data to send

ESPpituusB = cbyte(len(ESPsanomaST)) + cbyte(len(EndST))  ' Calc length

Debug.Print "AT+CIPSEND=" ; cstr(ESPpituusB) ; EndST; ' Send & Receive