Introduction: Use LinkNode to Control a Servo Through LinkSpriteIO

LinkSpriteIO provides an IOT server platform to control things. LinkNode is a WiFi board that is compatible with Arduino programming. In this tutorial, we show how to program the LinkSpriteIO and LinkNode so that we can remotely control the servo that is attached to LinkNode.

Step 1: Part List

LinkNode D1 x1

Servo x1

Jumper Wire x3

Step 2: ​Wiring Diagram:

Servo VCC (Red wire) -> LinkNode D1 5V

Servo GND ( gray wire ) -> LinkNode D1 GND

Servo Signal (yellow wire) -> LinkNode D1 GPIO15 ( Arduino-D10 )

Step 3: Please Follow the Following Steps to Add a LinkNode to LinkSpriteIO and Control It

1 Login: linksprite.io

( If there is no account, please sign up. )

2 Click “My Profile” and write down the API Key: “ a4d72fbb-3427-4ce1-b5b5-xxxxxxxx “ .

3 Click “My Profile” , then click “Create DIY Device” , And enter Device Name,Device Type , Group Name .

Note: Device Type must be selected 00(Custom device type) .

4 Now you can see Servo is in My Devices, Click “Servo” and record the Device ID: 0000000039.

5 Burn and write program. ( The simple code reference attachment )

Note: The first use of LinkNode D1 need to connect the WiFi, the specific operation, please refer to the linksprite wiki Tutorial 4 .

Please modify apikey and deviceID

//***********************************************

String apikey = “a4d72fbb-3427-4ce1-b5b5-88a17c6a8727″;

const char* deviceID=”0000000039”;

//***********************************************

6 After the success of the program to see the Servo device: “window” : ”1” Servo angle is 0 degrees

How to control: as shown in figure, fill in the relevant value:

// Servo angle control code, Can be modified according to the actual need.