File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
content/firmwareapi/pycom/network Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def socket_thread(p, coap_socket):
3434 sock = s[0 ]
3535 event = s[1 ]
3636 if (event & uselect.POLLIN ):
37- # Check if the socket belongs to CoAp module
37+ # Check if the socket belongs to the CoAp module
3838 if (sock == coap_socket):
3939 # Call Coap.read() which parses the incoming CoAp message
4040 Coap.read()
@@ -44,10 +44,10 @@ def socket_thread(p, coap_socket):
4444wlan = WLAN(mode = WLAN .STA )
4545wlan.connect(' your-ssid' , auth = (WLAN .WPA2 , ' your-key' ))
4646
47- # Initialize CoAp module
47+ # Initialise the CoAp module
4848Coap.init(str (wlan.ifconfig()[0 ]), service_discovery = True )
4949
50- # Add a resource with default value and plain text content format
50+ # Add a resource with a default value and a plain text content format
5151r = Coap.add_resource(" resource1" , media_type = Coap.MEDIATYPE_TEXT_PLAIN , value = " default_value" )
5252# Add an attribute to the resource
5353r.add_attribute(" title" , " resource1" )
You can’t perform that action at this time.
0 commit comments