Buy from US | Buy from UK | Buy from DE | Buy from IT | Buy from FR | Buy from ES | ここでご購入を! |
In previous lessons, we have shown how to use a web browser to access a board through the internet. In these examples, we used a protocol called HTTP.
First, please insert the ESP8266 Wi-Fi Shield into your mainboard.
OSOYOO basic board | Servo Wire |
GND | Brown |
3.3V | RED |
D9 | Orange |
Step A) Install the latest IDE from https://www.arduino.cc/en/Main/Software?setlang=en. If you have an IDE version after 1.1.16, please skip this step.
Step B) Download the PWMServo library zip file from https://osoyoo.com/driver/sg90car/PWMServo.zip. Then in your IDE ->Sketch->Include Library->Add .ZIP Library and select the two zip files you just downloaded, and upload them to the IDE.
Step C) Connect the OSOYOO Basic board to the computer via a USB cable.
Step D) Open the IDE and choose the corresponding board type and port type for your project:
Step E) Download the sample code from https://osoyoo.com/driver/wifi-iot/lesson6/wifi-lesson6.zip.
char ssid[] = "******"; // your network SSID (name) char pass[] = "******"; // your network password
Please replace the ****** with your correct Wi-Fi SSID and password; otherwise, your project cannot connect to the internet.
Step F) After changing the above lines, load the sketch into the IDE.
Step G) Open your serial monitor. You can see that your router will assign an IP address to your IDE as follows:
In the above result, you can see that my IP address is 192.168.1.81, UDP port 8888. We will put this IP in the cell phone app settings in the next step.
You can see the comments in the above code and understand the control logic.
DownLoad Url osoyoo.com