diff --git a/config.toml b/config.toml index 9377cff..c00e19a 100644 --- a/config.toml +++ b/config.toml @@ -329,7 +329,13 @@ theme = "doc-theme" parent = "tutorials@networkprotocols" weight = 10 [[menu.main]] - name = "HTTP Webserver" + name = "HTTP Client" + url = "/tutorials/networkprotocols/httpclient/" + identifier = "tutorials@networkprotocols@httpclient" + parent = "tutorials@networkprotocols" + weight = 12 +[[menu.main]] + name = "HTTP Server" url = "/tutorials/networkprotocols/webserver/" identifier = "tutorials@networkprotocols@webserver" parent = "tutorials@networkprotocols" @@ -364,6 +370,12 @@ theme = "doc-theme" identifier = "tutorials@networkprotocols@socket" parent = "tutorials@networkprotocols" weight = 50 +[[menu.main]] + name = "WiFi Sniffer" + url = "/tutorials/networkprotocols/wifisniffer/" + identifier = "tutorials@networkprotocols@wifisniffer" + parent = "tutorials@networkprotocols" + weight = 60 [[menu.main]] name = "Expansion Boards" diff --git a/content/tutorials/basic/print.md b/content/tutorials/basic/print.md index 6491aba..9c73310 100644 --- a/content/tutorials/basic/print.md +++ b/content/tutorials/basic/print.md @@ -24,4 +24,7 @@ print("hello world: {} {}".format(machine.rng(), " random number")) #you can also ask for user input result = input("what's up?\n") print(result) +# and lastly, you can also print like this,which is very useful when printing large amounts of data +i = 10 +print(1,2,3,'e',i) ``` \ No newline at end of file diff --git a/content/tutorials/networkprotocols/_index.md b/content/tutorials/networkprotocols/_index.md index 8f71cb9..f469cbc 100644 --- a/content/tutorials/networkprotocols/_index.md +++ b/content/tutorials/networkprotocols/_index.md @@ -6,8 +6,9 @@ aliases: --- Using our devices, several different network protocols can be used. We have grouped them in different categories. Not all examples will work with every network. Generally, examples are compatible with different networks. -**Protecols** +**Protocols** +* [WiFi Sniffer](../networkprotocols/wifisniffer/) * [HTTPS](../networkprotocols/https/) * [MQTT](../networkprotocols/mqtt/) * [NTP](../networkprotocols/ntp/) diff --git a/content/tutorials/networkprotocols/http.md b/content/tutorials/networkprotocols/http.md deleted file mode 100644 index e69de29..0000000 diff --git a/content/tutorials/networkprotocols/httpclient.md b/content/tutorials/networkprotocols/httpclient.md new file mode 100644 index 0000000..726c53e --- /dev/null +++ b/content/tutorials/networkprotocols/httpclient.md @@ -0,0 +1,7 @@ +--- +Title: 'HTTP Client' +--- +In this example, we discuss how to access information served on the internet. Once you have connected to either WiFi or LTE, it is possible to access any webpage. Now there is no such thing as a webbrowser like Chrome or Firefox in your device, and the REPL is not that great at rendering webpages either, so we are mainly looking at the source of the page here. + +For example, we can use the socket to render +... \ No newline at end of file diff --git a/content/tutorials/networks/wifisniffer.md b/content/tutorials/networkprotocols/wifisniffer.md similarity index 100% rename from content/tutorials/networks/wifisniffer.md rename to content/tutorials/networkprotocols/wifisniffer.md diff --git a/content/tutorials/networks/_index.md b/content/tutorials/networks/_index.md index e69de29..264f0c0 100644 --- a/content/tutorials/networks/_index.md +++ b/content/tutorials/networks/_index.md @@ -0,0 +1,16 @@ +--- +title: 'Networks' + +--- + +The Pycom devices support several different types of networks. +We have the WiFi and Bluetooth connections: + +* [WiFi](../networks/wifi/) +* [Bluetooth Low Energy](../networks/ble/) +* [LoRa](../networks/lora/) +* [Sigfox]( ../networks/sigfox/) +* [LTE](../networks/lte/) +* [Ethernet](../networks/ethernet/) + +> If you are looking for examples on how to connect to different services, check [here](../networkprotocols/) \ No newline at end of file diff --git a/content/tutorials/networks/lte/_index.md b/content/tutorials/networks/lte/_index.md index 44d0731..d292f90 100644 --- a/content/tutorials/networks/lte/_index.md +++ b/content/tutorials/networks/lte/_index.md @@ -213,5 +213,7 @@ Below, we review the responses from `print(lte.send_at_cmd('AT!="fsm"'))`. If yo | HP CAT FSM |IDLE | +--------------------------+--------------------+ ``` +* During and after `lte.connect()` we cannot call the `print(lte.send_at_cmd('AT!="fsm"'))` as the modem is in `data state`. * Potential other errors: - * `OSError: [Errno 202] EAI_FAIL`: Check the data plan / SIM activation status on network \ No newline at end of file + * `OSError: [Errno 202] EAI_FAIL`: Check the data plan / SIM activation status on network + * `OSError: [Errno 113] ECONNABORTED`: \ No newline at end of file