Skip to content

Commit

Permalink
V0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
LinDong88 committed Nov 14, 2024
0 parents commit 4da54fe
Show file tree
Hide file tree
Showing 39 changed files with 951 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/makecode/blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/makecode/blocksdiff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions .github/workflows/cfg-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Check pxt.json

on:
push:
branches:
- 'master'
- 'main'

jobs:
check-cfg:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm install -g pxt
pxt target microbit
- name: Checkout current state
run: |
git checkout -- .
git clean -fd
- name: Fix files listed in config if necessary
run: pxt checkpkgcfg
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
continue-on-error: true
with:
title: 'Removing missing files from pxt.json'
commit-message: 'Removing missing files from pxt.json'
delete-branch: true
29 changes: 29 additions & 0 deletions .github/workflows/makecode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: MakeCode

on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: |
npm install -g pxt
pxt target microbit
- name: build
run: |
pxt install
pxt build --cloud
env:
CI: true
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# MakeCode
built
node_modules
yotta_modules
yotta_targets
pxt_modules
_site
*.db
*.tgz
.header.json
.simstate.json
23 changes: 23 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"editor.formatOnType": true,
"files.autoSave": "afterDelay",
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/built/**": true,
"**/node_modules/**": true,
"**/yotta_modules/**": true,
"**/yotta_targets": true,
"**/pxt_modules/**": true
},
"files.associations": {
"*.blocks": "html",
"*.jres": "json"
},
"search.exclude": {
"**/built": true,
"**/node_modules": true,
"**/yotta_modules": true,
"**/yotta_targets": true,
"**/pxt_modules": true
}
}
30 changes: 30 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

// A task runner that calls the MakeCode (PXT) compiler
{
"version": "2.0.0",
"tasks": [{
"label": "pxt deploy",
"type": "shell",
"command": "pxt deploy --local",
"group": "build",
"problemMatcher": [ "$tsc" ]
}, {
"label": "pxt build",
"type": "shell",
"command": "pxt build --local",
"group": "build",
"problemMatcher": [ "$tsc" ]
}, {
"label": "pxt install",
"type": "shell",
"command": "pxt install",
"group": "build",
"problemMatcher": [ "$tsc" ]
}, {
"label": "pxt clean",
"type": "shell",
"command": "pxt clean",
"group": "test",
"problemMatcher": [ "$tsc" ]
}]
}
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 DFRobot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all: deploy

build:
pxt build

deploy:
pxt deploy

test:
pxt test
Empty file added README.md
Empty file.
8 changes: 8 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
makecode:
target: microbit
platform: microbit
home_url: https://makecode.microbit.org/
theme: jekyll-theme-slate
include:
- assets
- README.md
6 changes: 6 additions & 0 deletions _locales/es/ir-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"IR.IR_callbackUser|block": "Al recibir IR",
"IR.IR_init|block": "Inicializar el sensor infrarrojo",
"IR.IR_read|block": "Leer IR"

}
23 changes: 23 additions & 0 deletions _locales/es/maqueen-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"maqueen.Motors.M1|block": "izquierdo",
"maqueen.Motors.M2|block": "derecho",
"maqueen.Patrol.PatrolLeft|block": "izquierdo",
"maqueen.Patrol.PatrolRight|block": "derecho",
"maqueen.LEDswitch.turnOn|block": "encender",
"maqueen.LEDswitch.turnOff|block": "apagar",
"maqueen.LED.LEDLeft|block": "derecho",
"maqueen.LED.LEDRight|block": "izquierdo",
"maqueen.Dir.CW|block": "avanzar",
"maqueen.Dir.CCW|block": "retroceder",
"maqueen.motorStop|block": "Parar motor|%motors",
"maqueen.motorStopAll|block": "Parar motores",
"maqueen.motorRun|block": "Motor|%index|sentido|%Dir|velocidad|%speed",
"maqueen.IR_callbackUser|block": "Al recibir IR",
"maqueen.Ultrasonic|block": "Leer ultrasonidos en |%unit",
"maqueen.readPatrol|block": "Leer siguelínea|%patrol",
"maqueen.writeLED|block": "LED|%led|%ledswitch",
"maqueen.IR_read|block": "Leer IR",
"maqueen.servoRun|block": "Servomotor|%index|ángulo|%angle",
"maqueen.IR_read_version|block": "versión IR",
"maqueen.Motors.All|block": "ambos"
}
5 changes: 5 additions & 0 deletions _locales/fr/ir-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"IR.IR_callbackUser|block": "quand l'IR reçoit",
"IR.IR_init|block": "Initialiser le capteur infrarouge.",
"IR.IR_read|block": "lire l'infrarouge"
}
27 changes: 27 additions & 0 deletions _locales/fr/maqueen-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"PingUnit.Centimeters|block": "cm",
"PingUnit.MicroSeconds|block": "μs",
"maqueen.Dir.CCW|block": "antihoraire",
"maqueen.Dir.CW|block": "horaire",
"maqueen.IR_callbackUser|block": "quand l'IR reçoit",
"maqueen.IR_read_version|block": "Obtenir des informations sur le produit",
"maqueen.IR_read|block": "lire l'infrarouge",
"maqueen.LED.LEDLeft|block": "LEDGauche",
"maqueen.LED.LEDRight|block": "LEDDroite",
"maqueen.LEDswitch.turnOff|block": "éteindre",
"maqueen.LEDswitch.turnOn|block": "allumer",
"maqueen.motorRun|block": "Moteur|%index|dir|%Dir|vitesse|%speed",
"maqueen.Patrol.PatrolLeft|block": "DétecteurGauche",
"maqueen.Patrol.PatrolRight|block": "DétecteurDroite",
"maqueen.servoRun|block": "Servo|%index|angle|%angle",
"maqueen.Motors.M1|block": "M1",
"maqueen.Motors.M2|block": "M2",
"maqueen.Motors.All|block": "All",
"maqueen.Servos.S1|block": "S1",
"maqueen.Servos.S2|block": "S2",
"maqueen.motorStopAll|block": "Stop tous les moteurs",
"maqueen.motorStop|block": "Stop le moteur|%motors",
"maqueen.readPatrol|block": "Lire détecteur|%patrol",
"maqueen.Ultrasonic|block": "unité du senseur|%unit",
"maqueen.writeLED|block": "%ledswitch|la led|%led"
}
Empty file.
7 changes: 7 additions & 0 deletions _locales/ja/ir-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{

"IR.IR_callbackUser|block": "赤外線(V2): IRコードを受信したとき",
"IR.IR_init|block": "赤外線センサーを初期化する",
"IR.IR_read|block": "赤外線リモコンのキー値(V2)"

}
15 changes: 15 additions & 0 deletions _locales/ja/maqueen-jsdoc-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"maqueen.IR_read": "赤外線リモコンからのコード",
"maqueen.IR_read_version": "ロボットのバージョン番号",
"maqueen.IR_callbackUser": "リモコンボタンが押されたときの動作",
"maqueen.Ultrasonic": "超音波変換器からの値",
"maqueen.ltEvent": "指定したライン監視センサーが特定の色を感知したときの動作",
"maqueen.motorRun": "モーターの回転方向と速度をセットする / モーター:左, 右, すべて / 回転方向:前, 後ろ / 速さ:0~255",
"maqueen.motorStop": "モーターを止める",
"maqueen.readPatrol": "ライン監視センサーからの値",
"maqueen.servoRun": "サーボモーターを特定の角度に回転させる / ポート:S1、S2 / 角度:0~180度",
"maqueen.writeLED": "LEDライトのオン/オフ",
"maqueenIR.initIR": "赤外線リモコン受信機を指定ポートに接続する",
"maqueenIR.onPressEvent": "リモコンの指定ボタンが押されたときの動作",
"maqueencb": "@file pxt-maqueen/maqueen.ts\n@brief DFRobot's maqueen makecode library.\n@n [Get the module here](https://www.dfrobot.com.cn/goods-1802.html)\n@n This is a MakeCode graphical programming education robot.\n* @copyright [DFRobot](http://www.dfrobot.com), 2016\n@copyright MIT Lesser General Public License\n* @author [email]([email protected])\n@date 2019-10-08"
}
40 changes: 40 additions & 0 deletions _locales/ja/maqueen-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"PingUnit.Centimeters|block": "cm",
"maqueen.Motors.M1|block": "",
"maqueen.Motors.M2|block": "",
"maqueen.Motors.All|block": "すべて",
"maqueen.Servos.S1|block": "S1",
"maqueen.Servos.S2|block": "S2",
"maqueen.Dir.CW|block": "",
"maqueen.Dir.CCW|block": "後ろ",
"maqueen.Patrol.PatrolLeft|block": "",
"maqueen.Patrol.PatrolRight|block": "",
"maqueen.Patrol1.PatrolLeft|block": "",
"maqueen.Patrol1.PatrolRight|block": "",
"maqueen.Voltage.High|block": "",
"maqueen.Voltage.Low|block": "",
"maqueen.LED.LEDLeft|block": "",
"maqueen.LED.LEDRight|block": "",
"maqueen.LEDswitch.turnOn|block": "つける",
"maqueen.LEDswitch.turnOff|block": "消す",
"maqueen.IR_callbackUser|block": "赤外線: IRコードを受信したとき",
"maqueen.IR_read|block": "赤外線リモコンのキー値",
"maqueen.IR_callbackUserV2|block": "赤外線(V2): IRコードを受信したとき",
"maqueen.IR_readV2|block": "赤外線リモコンのキー値(V2)",
"maqueen.IR_read_version|block": "製品情報を取得",
"maqueen.Ultrasonic|block": "超音波センサー|%unit|の値",
"maqueen.motorRun|block": "%index|のモーターを|%Dir|へ 速さ|%speed|で回す",
"maqueen.motorStop|block": "%motors|のモーターを止める",
"maqueen.readPatrol|block": "ラインセンサー|%patrol|の値",
"maqueen.writeLED|block": "|%ledswitch|のLEDを|%led",
"maqueen.servoRun|block": "サーボモーター|%index|の角度を|%angle|にする",
"maqueen.ltEvent|block": "ラインセンサーの|%value|が|%vi|のとき",
"maqueenIR.onPressEvent|block": "赤外線: |%btn|ボタンが押されたとき",
"maqueenIR.initIR|block": "赤外線: |%pin|に接続",
"maqueenIRV2.onPressEvent|block": "赤外線(V2): |%btn|ボタンが押されたとき",
"maqueenIRV2.initIR|block": "赤外線(V2): |%pin|に接続",
"maqueen|block": "Maqueen",
"maqueenIR|block": "Maqueen 赤外線",
"{id:category}Maqueen": "Maqueen",
"{id:category}MaqueenIR": "Maqueen 赤外線"
}
5 changes: 5 additions & 0 deletions _locales/nb/ir-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"IR.IR_callbackUser|block": "Når Infrarød mottar ",
"IR.IR_init|block": "Initialiser infrarød sensor.",
"IR.IR_read|block": "Les Infrarød tast"
}
29 changes: 29 additions & 0 deletions _locales/nb/maqueen-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"maqueen.Motors.M1|block": "venstre",
"maqueen.Motors.M2|block": "høyre",
"maqueen.Patrol.PatrolLeft|block": "venstre",
"maqueen.Patrol.PatrolRight|block": "høyre",
"maqueen.LEDswitch.turnOn|block": "",
"maqueen.LEDswitch.turnOff|block": "av",
"maqueen.LED.LEDLeft|block": "venstre",
"maqueen.LED.LEDRight|block": "høyre",
"maqueen.Dir.CW|block": "fremover",
"maqueen.Dir.CCW|block": "bakover",
"maqueen.motorStop|block": "Stopp motor|%motors",
"maqueen.motorRun|block": "Kjør|%index|motor|%Dir| ved hastighet|%speed",
"maqueen.IR_callbackUser|block": "Når Infrarød mottar",
"maqueen.Ultrasonic|block": "Les avstand fra ultralyd i|%unit",
"maqueen.writeLED|block": "Slå LED lys|%led|%ledswitch",
"maqueen.IR_read|block": "Les Infrarød tast",
"maqueen.servoRun|block": "Sett servo|%index|vinkel til|%angle",
"maqueen.IR_read_version|block": "get product information",
"maqueen.Motors.All|block": "begge",
"maqueen.Patrol1.PatrolLeft|block":"venstre",
"maqueen.Patrol1.PatrolRight|block":"høyre",
"maqueen.Voltage.High|block":"høy",
"maqueen.Voltage.Low|block":"lav",
"maqueen.ltEvent|block":"Når|%value linjesensor er|%vi",
"maqueen.IR_callbackUserV2|block": "Når Infrarød mottar ",
"maqueen.IR_readV2|block": "Les Infrarød tast"

}
27 changes: 27 additions & 0 deletions _locales/pl/maqueen-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"maqueen.Dir.CCW|block": "do tyłu",
"maqueen.Dir.CW|block": "do przodu",
"maqueen.IR_callbackUser|block": "gdy odbierze IR",
"maqueen.IR_read_version|block": "odczytaj wersję IR",
"maqueen.IR_read|block": "odczytaj IR",
"maqueen.LED.LEDLeft|block": "lewa LED",
"maqueen.LED.LEDRight|block": "prawa LED",
"maqueen.LEDswitch.turnOff|block": "wyłącz",
"maqueen.LEDswitch.turnOn|block": "włącz",
"maqueen.motorRun|block": "Silnik|%index|kierunek|%Dir|prędkość|%speed",
"maqueen.Motors.All|block": "oba",
"maqueen.Motors.M1|block": "M1",
"maqueen.Motors.M2|block": "M2",
"maqueen.motorStopAll|block": "Zatrzymaj oba silniki",
"maqueen.motorStop|block": "Zatrzymaj silnik|%motors",
"maqueen.Patrol.PatrolLeft|block": "lewy detektor linii",
"maqueen.Patrol.PatrolRight|block": "prawy detektor linii",
"maqueen.readPatrol|block": "Odczytaj detektor linii|%patrol",
"maqueen.servoRun|block": "Serwonapęd|%index|kąt|%angle",
"maqueen.Servos.S1|block": "S1",
"maqueen.Servos.S2|block": "S2",
"maqueen.Ultrasonic|block": "Odczytaj ultradźwięki |%unit",
"maqueen.writeLED|block": "LED|%led|%ledswitch",
"PingUnit.Centimeters|block": "cm",
"PingUnit.MicroSeconds|block": "μs",
}
5 changes: 5 additions & 0 deletions _locales/pt/ir-strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"IR.IR_callbackUser|block": "em Infravermelhos recebido",
"IR.IR_init|block": "Inicializar o sensor infravermelho.",
"IR.IR_read|block": "ler infravermelhos"
}
Loading

0 comments on commit 4da54fe

Please sign in to comment.