From e0931ae2fa919cf2956338cf917c3b9d0e545ba9 Mon Sep 17 00:00:00 2001 From: Geza Husi Date: Sat, 7 Dec 2019 08:31:42 +0100 Subject: [PATCH] Correct new review findings --- content/firmwareapi/pycom/network/coap.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/firmwareapi/pycom/network/coap.md b/content/firmwareapi/pycom/network/coap.md index 8cb2cc1..6c503f6 100644 --- a/content/firmwareapi/pycom/network/coap.md +++ b/content/firmwareapi/pycom/network/coap.md @@ -34,7 +34,7 @@ def socket_thread(p, coap_socket): sock = s[0] event = s[1] if(event & uselect.POLLIN): - # Check if the socket belongs to CoAp module + # Check if the socket belongs to the CoAp module if(sock == coap_socket): # Call Coap.read() which parses the incoming CoAp message Coap.read() @@ -44,10 +44,10 @@ def socket_thread(p, coap_socket): wlan = WLAN(mode=WLAN.STA) wlan.connect('your-ssid', auth=(WLAN.WPA2, 'your-key')) -# Initialize CoAp module +# Initialise the CoAp module Coap.init(str(wlan.ifconfig()[0]), service_discovery=True) -# Add a resource with default value and plain text content format +# Add a resource with a default value and a plain text content format r = Coap.add_resource("resource1", media_type=Coap.MEDIATYPE_TEXT_PLAIN, value="default_value") # Add an attribute to the resource r.add_attribute("title", "resource1")