Socket
Book a DemoInstallSign in
Socket

@kaisclan/client

Package Overview
Dependencies
Maintainers
3
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaisclan/client

JS interface for communication with KaisClan robots and classroom

3.40.0
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
3
Weekly downloads
 
Created
Source

semantic-release npm (scoped) pipeline status

Communicate with KaisClan robots.

  • Npm
  • Browser
  • Usage

NPM usage

  • First install the library and MQTT client yarn add @kaisclan/client mqtt
  • Ensure that you have active MQTT connect mqtt.connect('ws://3dpslabs.com:9001')
  • After connect you can use like
const { ClassRoom, Robot, Schemas } = require('kaisclan');
const mqtt = require('mqtt')

Now you can use the library.

Browser

  • Add KaisClan and MQTT CDN libraries to your HTML page
<script type="text/javascript" src="//unpkg.com/@kaisclan/client@2.2.3"></script>
<script type="text/javascript" src="//unpkg.com/mqtt/dist/mqtt.min.js"></script>

Now you can use the library.

Usage

const client = mqtt.connect(`ws://3dpslabs.com:9001`);
client.on('connect', function () {
  const classRoomABC = new ClassRoom('ABC123', client);

  // Instance robot with ClassRoom
  const robot1 = new Robot('1', classRoomABC);
  robot1.moveTo(200, 200);

  // Instance robot by self	
  const robot2 = new Robot('2', classRoomABC, { x: 100, y: 200, a: 120 });
  robot2
    .moveBackward(20)
    .changeAngle(160)
    .moveForward(80);
})

Test locally

  • npm link will allow you install your package in locally projects
  • On your test project use npm link kaisclan to install project

FAQs

Package last updated on 13 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.