You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/quickstart.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,21 @@ If the Ethernet library is not already installed, open the "Library Manager" too
76
76
77
77
## Arduino Example
78
78
79
-
Now that we have everything assembled, connected and installed, let's run a quick test sketch in Arduino to make sure we can connect to the Internet. For this we'll use the **WebClient** example included in the **Ethernet Arduino Library** to connect to a website (in this case, http://www.google.com). Open the example by navigating to **File** > **Examples** > **Ethernet** > **WebClient**. Select your Board and Port and click the "Upload" button.
79
+
Now that we have everything assembled, connected and installed, let's run a quick test sketch in Arduino to make sure we can connect to the Internet. For this we'll use the **WebClient** example included in the **Ethernet Arduino Library** to connect to a website (in this case, http://www.pjrc.com) and print out . Open the example by navigating to **File** > **Examples** > **Ethernet** > **WebClient**. Select your Board and Port and click the "Upload" button.
80
80
81
-
After the code finishes compiling and uploading, open the [serial monitor](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-serial-monitor/) with the baud set to **9600**.
81
+
After the code finishes compiling and uploading, open the [serial monitor](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-serial-monitor/) with the baud set to **9600**. The example attempts to
82
+
83
+
<figuremarkdown>
84
+
[{ width="600"}](./assets/img/Ethernet_Adapter-Serial.png"Click to enlarge")
85
+
</figure>
86
+
87
+
### Code to Note
88
+
89
+
You may notice in the screenshot above that the Teensy is connecting to "www.pjrc.com" instead of "www.google.com". The code defaults to use DNS to connect to a website here:
90
+
91
+
```c++
92
+
//IPAddress server(74,125,232,128); // numeric IP for Google (no DNS)
93
+
char server[] = "www.google.com"; // name address for Google (using DNS)
94
+
```
95
+
96
+
You can enter any full web address here so we changed it to PJRC's website. Alternatively, you can uncomment the <code>IPAddress server ();</code> line and comment out the <code>char server[] = "www.google.com";</code> to connect directly to an IP address and bypass DNS to reduce the size of the sketch.
0 commit comments