mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 05:06:35 +01:00
more changes and additions
This commit is contained in:
14
config.toml
14
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"
|
||||
|
||||
@@ -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)
|
||||
```
|
||||
@@ -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/)
|
||||
|
||||
7
content/tutorials/networkprotocols/httpclient.md
Normal file
7
content/tutorials/networkprotocols/httpclient.md
Normal file
@@ -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
|
||||
...
|
||||
@@ -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/)
|
||||
@@ -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
|
||||
* `OSError: [Errno 202] EAI_FAIL`: Check the data plan / SIM activation status on network
|
||||
* `OSError: [Errno 113] ECONNABORTED`:
|
||||
Reference in New Issue
Block a user