Skip to content

Commit 3f7608a

Browse files
authored
Merge pull request #490 from arduino/martab1994-patch-5
Update content.md
2 parents 95fcadc + 8dca0dc commit 3f7608a

File tree

1 file changed

+11
-11
lines changed
  • content/hardware/04.pro/shields/portenta-vision-shield/tutorials/ethernet-with-openmv

1 file changed

+11
-11
lines changed

content/hardware/04.pro/shields/portenta-vision-shield/tutorials/ethernet-with-openmv/content.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ With the Ethernet version of the Arduino Portenta Vision Shield it is possible t
3434
- Ethernet cable
3535
- USB-C cable
3636

37-
***If you want to know about the ethernet connection please go to the [Arduino IDE ethernet tutorial](https://docs.arduino.cc/tutorials/portenta-vision-shield/ethernet-with-ide#ethernet-connection)***
37+
***If you want to know more about the ethernet connection please go to the [Arduino IDE ethernet tutorial](https://docs.arduino.cc/tutorials/portenta-vision-shield/ethernet-with-ide#ethernet-connection)***
3838

3939
## Instructions
4040

@@ -44,17 +44,17 @@ Connect the Portenta Vision Shield Ethernet to the Portenta H7. Now connect the
4444

4545
### Programming the Board
4646

47-
After everything is connected, connect the board to OpenMV to install the latest firmware. Once it is connected, we can open the example we are going to upload. In OpenMV go to: **File > Examples > Arduino > Portenta H7 > Ethernet > http_client.py**.
47+
After everything is connected, connect the board to OpenMV to install the latest firmware. Once it is connected, you can open the example we are going to upload. In OpenMV go to: **File > Examples > Arduino > Portenta H7 > Ethernet > http_client.py**.
4848

4949
![Where to find the example in OpenMV](assets/vs-eth-openmv-example.png)
5050

51-
Next we will look at some of the code in the example script.
51+
Next you can have a look at some of the code in the example script.
5252

5353
### Testing It Out
5454

55-
Now lets take a look at some important parts of the code.
55+
Now let's take a look at some important parts of the code.
5656

57-
First we are making use of some micropython libraries, [network](http://docs.micropython.org/en/latest/library/network.html) and [usocket](http://docs.micropython.org/en/v1.14/library/usocket.html).
57+
First you are making use of some micropython libraries, [network](http://docs.micropython.org/en/latest/library/network.html) and [usocket](http://docs.micropython.org/en/v1.14/library/usocket.html).
5858

5959
```arduino
6060
import network, usocket
@@ -67,7 +67,7 @@ PORT = 80
6767
HOST = "www.google.com"
6868
```
6969

70-
The `usocket.getaddrinfo(HOST, PORT)[0][4]` function will translate the host/port argument into a sequence of 5-tuples that contain all the necessary arguments for creating a socket connected to that service. Then we can create a socket object with `usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM)`. We can combine these variables we have created, allowing us to connect the socket to our desired address.
70+
The `usocket.getaddrinfo(HOST, PORT)[0][4]` function will translate the host/port argument into a sequence of 5-tuples that contains all the necessary arguments for creating a socket connected to that service. Then, you can create a socket object with `usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM)`. You can combine these variables you have created to connect the socket to your desired address.
7171

7272
```arduino
7373
addr = usocket.getaddrinfo(HOST, PORT)[0][4]
@@ -83,20 +83,20 @@ This will print the websites content in the serial terminal in OpenMV. The argum
8383
print(client.recv(1024))
8484
```
8585

86-
After the board has printed all of the websites content it will automatically disconnect with a simple `close()` call. Now lets take a look at what the output should look like if everything went correctly.
86+
After the board has printed all of the websites content, it will automatically disconnect with a simple `close()` call. Now let's take a look at what the output should look like if everything went correctly.
8787

8888
### Sketch Result
8989

90-
After uploading the sketch, open the serial terminal. The board will connect to a website. Then print the websites content in the serial terminal. If everything went correctly your serial terminal should look like the image below.
90+
After uploading the sketch, open the serial terminal. The board will connect to a website. Then print the websites content in the serial terminal. If everything went correctly, your serial terminal should look like the image below.
9191

9292
![Serial monitor showing the result of the sketch](assets/vs-eth-openmv-serial.png)
9393

94-
After the connection has been made, the html code of the website entered into the sketch will be printed in the serial monitor.
94+
After the connection has been made, the html code of the website entered into the sketch will be printed in the Serial Monitor.
9595

9696
## Conclusion
9797

98-
This tutorial showed how to connect the Portenta H7 with a Vision Shield Ethernet to the Internet, with an example script in the OpenMV. The sketch allowed the board to connect to a website and print it's content. The Portenta H7 and Vision Shield can also be used with the Arduino IDE, have a look at the [Arduino IDE Ethernet tutorial](https://docs.arduino.cc/tutorials/portenta-vision-shield/ethernet-with-ide) if you want to see a similar example.
98+
This tutorial showed how to connect the Portenta H7 with a Vision Shield Ethernet to the Internet, with an example script in the OpenMV. The sketch allowed the board to connect to a website and print its content. The Portenta H7 and Vision Shield can also be used with the Arduino IDE, have a look at the [Arduino IDE Ethernet tutorial](https://docs.arduino.cc/tutorials/portenta-vision-shield/ethernet-with-ide) if you want to see a similar example.
9999

100100
### Next Steps
101101

102-
Now that you know the basics of how to establish a connection to the Internet with Ethernet, you can try to create more advanced scripts with this connection. An Ethernet connection allows you to send HTTP methods to another device, communicate with another device, API, or even another Portenta. A good next step would be to take a look at the other examples listed under Ethernet in OpenMV, or take a look at the library documentation.
102+
Now that you know the basics of how to establish a connection to the Internet with Ethernet, you can try to create more advanced scripts with this connection. An Ethernet connection allows you to send HTTP methods to another device, communicate with another device, API, or even another Portenta. A good next step would be to take a look at the other examples listed under Ethernet in OpenMV, or take a look at the library documentation.

0 commit comments

Comments
 (0)