Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
add to gitignore
  • Loading branch information
jcksnvllxr80 committed Dec 23, 2021
1 parent 336c6ac commit ba29124
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/rp2-pico-20210902-v1.17.uf2
/bak
conf/config.json
examples/random
5 changes: 3 additions & 2 deletions wifi/esp8266.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _sendToESP8266(self, atCMD, delay=1):
"""
self.__rxData = str()
self.__txData = atCMD
#print("---------------------------"+self.__txData)
print("---------------------------"+self.__txData)
self.__uartObj.write(self.__txData)
self.__rxData = bytes()

Expand Down Expand Up @@ -406,7 +406,7 @@ def getConnectionStatus(self):
"""
retData = self._sendToESP8266("AT+CIPSTATUS\r\n")
if retData:
# print("Returned from \'AT+CIPSTATUS\': {}".format(retData))
print("Returned from \'AT+CIPSTATUS\': {}".format(retData))
if "STATUS:2" in retData.decode("utf-8"):
return ESP8266_WIFI_CONNECTED
else:
Expand Down Expand Up @@ -478,6 +478,7 @@ def doHttpGet(self, host, path, user_agent="RPi-Pico", port=80):
#print(getHeader,len(getHeader))
txData = "AT+CIPSEND="+str(len(getHeader))+"\r\n"
retData = self._sendToESP8266(txData)
print('response: {}'.format(retData))
if(retData != None):
if ">" in retData:
retData = self._sendToESP8266(getHeader, delay=2)
Expand Down

0 comments on commit ba29124

Please sign in to comment.