GithubHelp home page GithubHelp logo

yukai / pxt-robocon Goto Github PK

View Code? Open in Web Editor NEW
1.0 11.0 0.0 92 KB

This is command sets for the robot of ROBOCON 2020

Home Page: http://www.official-robocon.com/shougakusei/

License: MIT License

Makefile 0.28% TypeScript 99.72%

pxt-robocon's Introduction

Syogakusei ROBOCON 2020 command set library

This is a Microsoft MakeCode extension for Syogakusei ROBOCON 2020.

これは小学生ロボコン2020のために作られたMicrosoft MakeCode用の拡張機能です。

Command details

move (モータをうごかす)

robocon.move(robocon.Motors.AAA, robocon.Direction.BBB, CCC)

robocon.Motors.AAA could be from One to Four.
robocon.Motors は 1 から 4 でせっていします。

robocon.Direction.BBB could be Forward or Backward.
robocon.Direction.BBB は「まえ」か「うしろ」でせっていします。

CCC means power(0 - 100).
CCC はパワーで 0 から 100 でせっていします。

stop (モータをとめる)

robocon.move(robocon.Motors.AAA)

robocon.Motors.AAA could be from One to Four.
robocon.Motors は 1 から 4 でせっていします。

createDisplay (4けたディスプレイ たんしXXとたんしXX)

It create a display connecting to pin DDD and pin EEE.
たんしDDDとたんしEEEをつないだディスプレイをせっていします。

let dis1 = main.createDisplay(DDD, EEE)

DDD, EEE could be DigitalPins.
DDD, EEE はデジタルピンです。

set (4けたディスプレイのあかるさをかえる)

dis1.set(FFF)

FFF could be from 1 to 7. FFF は 1 から 7 でせっていします。

measure (ちょうおんぱセンサをこうしんする)

robocon.measure(DigitalPin.GGG)

DigitalPin.DDD could be the pin you want to get value from.
DigitalPin.DDD はあたいをとりたいデジタルピンです。

show (4けたディスプレイにひょうじする)

robocon.show(DigitalPin.HHH)

DigitalPin.DDD could be the pin you want to get value from.
DigitalPin.DDD はあたいをみたいピンのばんごうをせっていします。

License

MIT

Supported targets

  • for PXT/microbit

pxt-robocon's People

Contributors

yusakuxxu avatar siwa1989 avatar

Stargazers

xsue.github prime avatar

Watchers

Shunsuke Aoki avatar xsue.github prime avatar James Cloos avatar  avatar  avatar Sebastian Miller avatar  avatar  avatar Norio Ikedo avatar KotaYamada avatar YuheiOKAWA 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.