Goal | Use the Handy SDK in a TypeScript project and make Handy move to a position using Handy Direct Streaming Protocol (HDSP) |
---|---|
Completion time | 15min |
Skills needed | Typescript, package managers |
Installed tools | nodejs + npm |
The Handy SDK is a great way to create powerful integrated projects in a short time. In this tutorial, we will make the Handy move to one position then another after 5 seconds using Handy Direct Streaming Protocol (HDSP).
We will use webpack
to compile our project and lodash
to get it working on a browser.
<aside> 💡 We are not focusing on edge cases and error handling in this tutorial.
</aside>
Create a folder and navigate into it:
mkdir typescript-sdk
cd typescript-sdk
Create a new project:
npm init -y
Not needed if you already have this installed globally
npm install -D typescript webpack webpack-cli
npm install lodash
For this tutorial, we will be using a specific version. Feel free to remove the @2.3.2
at the end to get the latest version.
npm i @ohdoki/[email protected]
Create a webpack configuration file in root webpack.config.js
: