GithubHelp home page GithubHelp logo

james-calliope / calliope-joystick Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microbit-grove-library/pxt-thumbjoystick

0.0 1.0 0.0 13 KB

双轴按键摇杆模块可用于控制机器人的舵机、马达的运动方向

License: MIT License

TypeScript 100.00%

calliope-joystick's Introduction

双轴按键摇杆模块

双轴按键摇杆模块用于控制机器人,舵机,马达的运动方向.

8

Usage

How to connect a Grove - ThumbJoystick to Microbit

Prepare

Connecting a Grove - ThumbJoystick to Microbit is a bit tricky, but it is worth doing. So let's go!!

Firstly, we need to prepare a Micro:bit, a Grove shield, a tweezers(or needle), a scissors, a Grove - Thumb Joystick, and a Grove - Branch Cable.

It is very very important to pay attention when using scissors and tweezers!

1

Step1

As the pictures shown, the Grove - Branch Cable has 3 connectors. We name them Conector#1, Conector#2 and Conector#3. Note that Conector#2 and Conector#3 have no differences at first.

Then carefully pick the white cable out of Conector#2 with a tweezers(or needle).

2

Step2

Carefully pick the yellow cable and white cable out of Conector#3 with a tweezers(or needle).

3

Step3

Be careful not to cut the wrong cable!!!

Cut the white cable of Conector#2 and the yellow cable of Conector#3.

4

Step4

Insert the white cable to the first slot of Conector#3 as the picture shown.

5

Step5

Almost done!

Now we connect Conector#2 to P0/P14 port and Conector#3 to P1/P15 port of Grove shield.

6

Step6

The last step! We connect Conector#1 to Grove - Thumb Joystick and finish!

7

Demo 1: Display Arrow

Now let me show you how to program in Makecode.

After adding this package to Makecode, we can find a block named "on Key Up/Down/..". This block is similar to the base block "on button A/B pressed", it means if the key is at "Up" status, an event handler is started.

8

9

This is an example of showing some arrows when Grove - Thumb Joystick is manipulated.

10

License

MIT

calliope-joystick's People

Contributors

james-calliope avatar jerryyip avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.