community-sdk-wiki

Wiki for community-sdk

View the Project on GitHub KanoComputing/community-sdk-wiki

Before you start (requirements)

You will need to install or have installed a few softwares before you start. Those are just enough to use the programming language. The only extra software is a dependency manager (so it’s easy to install the other dependencies).

We won’t go in detail on how to install it but a quick search “How to install name of the software on name of your operational system” will probably lead you to plenty tutorials.

You will also need drivers to make your computer able to communicate with Kano devices. Luckly all the required drivers will be in place by just downloading and installing Kano Code. If you are running a Linux distribution, then you are probably safe already (get in touch if you have issues).

Javascript/Node.js

You can check Node.js and Yarn versions by typing node --version and yarn --version on your terminal/console and it will print something like v8.10.0 or 1.9.4.

Python 3

We recommend installing Mu Editor as it will install all the requirements for you. In case you want to use other code editor, you will need to install the following software:

You can check Python and Pip versions by typing python --version and pip --version on your terminal/console and it will print something like Python 3.6.5 or pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6) .

If your computer had python 2 already installed you might have to add 3 after all your commands, like python3 --version and pip3 --version. We strongly recommend using Mu Editor if you don’t want to deal with this kind of issue.

Downloading SDK and installing dependencies

Javascript/Node.js entire project

  1. Download the latest Node.js SDK release here
  2. Unzip the folder on a folder easy to access by the terminal (for example your home folder)
  3. Navigate to your unzipped folder using the terminal. Check how to do it on Windows, MacOS or Linux
  4. Install all the dependencies by running yarn install. That might take a while.
  5. Connect your Kano device to your computer and make sure they are on if needed (mostly Pixel Kit)
  6. Run an example to test if everything is ok:
    • For Pixel Kit: node examples/rpk_stream_frame.js
    • For Motion Sensor Kit: node examples/msk_proximity_and_gesture_data.js

Javascript/Node.js as a module

  1. Create a folder for your project
  2. Initialize your project: yarn init
  3. Add the Community SDK as dependency: yarn add KanoComputing/community-sdk#nodejs
  4. Follow the documentation on to use it in your project.

Python 3 with Mu Editor

  1. Download the latest Python SDK release here
  2. Unzip the folder on a folder you can find easily
  3. Connect your Kano device to your computer and make sure they are on if needed (mostly Pixel Kit)
  4. Open Mu Editor and switch to Python 3 mode
  5. Run an example to test if everything is ok by loading one of the example files from the unzipped folder:
    • For Pixel Kit: example_pixel_kit_stream_frame.py
    • For Motion Sensor Kit: example_motion_sensor.py
  6. Press the “Run” button on the toolbar

Python 3 without Mu Editor

  1. Download the latest Python SDK release here
  2. Unzip the folder on a folder easy to access by the terminal (for example your home folder)
  3. Navigate to your unzipped folder using the terminal. Check how to do it on Windows, MacOS or Linux
  4. Install all the dependencies by running pip install -r requirements.txt
  5. Run an example to test if everything is ok:
    • For Pixel Kit: python example_pixel_kit_stream_frame.py
    • For Motion Sensor Kit: python example_motion_sensor.py

Make sure to use python3 and pip3 if needed.