Authorized Online Retailers:

Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES 日本Amazon

SKU:DKRK100900

Introduction

About this project:

In this lesson, we will show how to use W5100 Ethernet Shield and OSOYOO Basic mainboard  to work as Web Server , show “hello world!” message in browser.

Preparation

Hardware:

Software:

Connection

Just simply insert W5100 Ethernet shield to OSOYOO Basic mainboard , then connect W5100 to Router through RJ45 cable.Connect  a network cable to W5100 network port .If need to use phone control, please keep the phone network consistent with the W5100 network.

Upload Sketch

Connect the OSOYOO Basic mainboard  to computer via USB cable,download sketch from https://osoyoo.com/driver/ethernet_iot/lesson1/w5100webserver.ino and load it into IDE

After do that,choose the corresponding board type and port type as below

Now you can upload the sketch code to OSOYOO Basic mainboard  by click UPLOAD button(press Ctrl+U key)

Explanation of w5100webservo.ino

The most important code lines are line 64,65 as following:

client.println(“”);
client.println(”

Osoyoo Ethernet IoT Lesson 1

Hello World!“);

These two lines send following string to browser:

Osoyoo Ethernet IoT Lesson 1

Hello World!

Running Result

When the code is running  in mainboard, open the Serial Monitor(set baud rate to 9600in lower right corner), you will see  serial monitor suggest you visit  some url  as following page:

In above example, we can visit http://192.168.50.14 , you will see browser page shows html data from IDE:

Osoyoo Ethernet IoT Lesson 1

Hello World!