Close

Site Information

Use LinkNode to Control a Servo through LinkSpriteIO

Posted on


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.

This tutorial uses the following parts:

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 )

linknode-servo-1

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. )

linknode-servo-2

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

linknode-servo-3

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) .

linknode-servo-4

linknode-servo-5

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

linknode-servo-75 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”;

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

linknode-servo-8

6 After the success of the program to see the Servo device:

“window” : ”1”

Servo angle is 0 degrees

linknode-servo-9

linknode-servo-10

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

linknode-servo-11

linknode-servo-12

linknode-servo-13

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

linknode-servo-14

comments powered by Disqus