Skip to content

Commit 4c637a9

Browse files
committed
update blocks manual
1 parent d5ec2f5 commit 4c637a9

File tree

3 files changed

+23
-58
lines changed

3 files changed

+23
-58
lines changed
Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,20 @@
11
{
2-
"ADS1015.readPin": "ReadData From ADS1015\r\nData Format = 3mV/FS",
3-
"ADS1015.readPin|param|channel": "[0-3] choose ADC channel; eg: 0, 1",
4-
"Matrix.dread": "read data from D1 or D2",
5-
"Matrix.dread|param|pin": "[0-1] choose D1 or D2; eg: 0, 1",
6-
"Matrix.enableInterrupt": "enable serial interrupt",
7-
"Matrix.motor": "DC Motor",
8-
"Matrix.motor|param|ch": "[0, 2] choose M1 or M2; eg: 0, 2",
9-
"Matrix.motor|param|sp": "[-100-100] set motor speed; eg: 0, -90",
10-
"Matrix.readADC": "read analog port",
11-
"Matrix.readADC|param|ch": "[0-1] choose A1 or A2; eg: 0, 1",
12-
"Matrix.servo": "set RC servo angle",
13-
"Matrix.servoRelease": "release all servo motor",
14-
"Matrix.servo|param|port": "[0-1] choose RC1 or RC2; eg: 0, 1",
15-
"Matrix.showLED": "set LED RGB",
16-
"Matrix.showLED|param|b": "[0-255] LED Blue brightness; eg: 0,225",
17-
"Matrix.showLED|param|g": "[0-255] set LED Green brightness; eg: 0,225",
18-
"Matrix.showLED|param|led": "[0-1] set the displayed LED; eg: 0,1",
19-
"Matrix.showLED|param|r": "[0-255] set LED Red brightness; eg: 0,225",
20-
"Matrix.ultrasonic": "read distance from ultrasonic sensor",
21-
"Matrix.ultrasonic|param|port": "[0-1] choose D1 or D2; eg: 0, 1",
22-
"PCA9633.setPWM": "Set PWM to PCA9633",
23-
"PCA9633.setPWM|param|channel": "[0-3] choose PWM channel; eg: 0, 1",
24-
"PCA9633.setPWM|param|duty": "[0-255] pulse of servo; eg: 1, 2, 4",
25-
"RGB_MODE": "Different modes for RGB or RGB+W NeoPixel strips",
26-
"SR04.distance": "Read distance from module",
27-
"SR04.distance|param|echo": "[1-15] choose echo pin; eg: 14, 12",
28-
"SR04.distance|param|trig": "[1-15] choose trigger pin; eg: 1, 15",
29-
"WS2812B": "Functions to operate LED strips.",
30-
"WS2812B.Strip": "A LED strip",
31-
"WS2812B.Strip.length": "Gets the number of pixels declared on the strip",
32-
"WS2812B.Strip.setBrightness": "Set the brightness of the strip. This flag only applies to future operation.",
33-
"WS2812B.Strip.setBrightness|param|brightness": "a measure of LED brightness in 0-255. eg: 255",
34-
"WS2812B.Strip.setPin": "Set the pin where the neopixel is connected, defaults to P8.",
35-
"WS2812B.Strip.setPixelColor": "Set LED to a given color (range 0-255 for r, g, b).\r\nYou need to call ``show`` to make the changes visible.",
36-
"WS2812B.Strip.setPixelColor|param|pixeloffset": "position of the NeoPixel in the strip",
37-
"WS2812B.Strip.setPixelColor|param|rgb": "RGB color of the LED",
38-
"WS2812B.Strip.show": "Send all the changes to the strip.",
39-
"WS2812B.create": "Create a new LED driver for `numleds` LEDs.",
40-
"WS2812B.create|param|numleds": "number of leds in the strip, eg: 24,30,60,64",
41-
"WS2812B.create|param|pin": "the pin where the LED is connected."
2+
"Matrix.dread": "讀取數位插槽電位邏輯(0, 1)",
3+
"Matrix.dread|param|pin": "[0-1] 選擇D1或D2輸入; eg: 0, 1",
4+
"Matrix.enableInterrupt": "啟動串列埠中斷控制",
5+
"Matrix.motor": "設定直流馬達轉速",
6+
"Matrix.motor|param|ch": "[0, 2] 選擇M1或M2輸出; eg: 0, 2",
7+
"Matrix.motor|param|sp": "[-100-100] 馬達速度百分比; eg: 0, -90",
8+
"Matrix.readADC": "讀取類比插槽數值(10-bits)",
9+
"Matrix.readADC|param|ch": "[0-1] 選擇A1或A2輸入; eg: 0, 1",
10+
"Matrix.servo": "設定RC伺服馬達的角度",
11+
"Matrix.servoRelease": "釋放所有伺服馬達",
12+
"Matrix.servo|param|port": "[0-1] 選擇RC1或RC2輸出; eg: 0, 1",
13+
"Matrix.showLED": "設定LED RGB亮度",
14+
"Matrix.showLED|param|b": "[0-255] 設定LED 藍色亮度; eg: 0,225",
15+
"Matrix.showLED|param|g": "[0-255] 設定LED 綠色亮度; eg: 0,225",
16+
"Matrix.showLED|param|led": "[0-1] 選擇設定的LED; eg: 0,1",
17+
"Matrix.showLED|param|r": "[0-255] 設定LED 紅色亮度; eg: 0,225",
18+
"Matrix.ultrasonic": "從超音波感測器讀取距離(cm)",
19+
"Matrix.ultrasonic|param|port": "[0-1] 選擇D1或D2插槽; eg: 0, 1"
4220
}
Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
11
{
2-
"ADS1015|block": "ADS1015",
32
"Matrix.dread|block": "數位插槽 |%pin|",
4-
"Matrix.enableInterrupt|block": "啟動序列埠中斷|鮑率 %baud",
3+
"Matrix.enableInterrupt|block": "啟動串列埠中斷控制|鮑率 %baud",
54
"Matrix.motor|block": "直流馬達 |%ch| 速度 |%sp|",
65
"Matrix.readADC|block": "類比插槽 |%ch|",
76
"Matrix.servoRelease|block": "伺服馬達釋放",
87
"Matrix.servo|block": "RC伺服馬達 |%port| 角度 |%angle|",
98
"Matrix.showLED|block": "LED%led 紅%r 綠%g 藍%b",
109
"Matrix.ultrasonic|block": "超音波感測器 |%port|",
11-
"Matrix|block": "Matrix",
12-
"PCA9633|block": "PCA9633",
13-
"RGB_MODE.RGBW|block": "RGB+W",
14-
"RGB_MODE.RGB_RGB|block": "RGB (RGB format)",
15-
"RGB_MODE.RGB|block": "RGB (GRB format)",
16-
"SR04|block": "SR04",
17-
"WS2812B|block": "WS2812B",
18-
"{id:category}ADS1015": "ADS1015",
19-
"{id:category}Matrix": "Matrix",
20-
"{id:category}PCA9633": "PCA9633",
21-
"{id:category}SR04": "SR04",
22-
"{id:category}Serial_IT": "Serial_IT",
23-
"{id:category}WS2812B": "WS2812B"
10+
"Matrix|block": "Matrix"
2411
}

matrix.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ namespace Matrix{
107107

108108

109109
/**
110-
*DC Motor
110+
*set speed of DC Motor
111111
*@param ch [0, 2] choose M1 or M2; eg: 0, 2
112112
*@param sp [-100-100] set motor speed; eg: 0, -90
113113
*/
@@ -165,7 +165,7 @@ namespace Matrix{
165165
}
166166

167167
/**
168-
*read distance from ultrasonic sensor
168+
*read distance from ultrasonic sensor(cm)
169169
*@param port [0-1] choose D1 or D2; eg: 0, 1
170170
*/
171171
//%block="ultrasonic sensor |%port|"
@@ -182,7 +182,7 @@ namespace Matrix{
182182
}
183183

184184
/**
185-
*read analog port
185+
*read analog port(10-bits)
186186
*@param ch [0-1] choose A1 or A2; eg: 0, 1
187187
*/
188188
//%block="read data from |%ch|"

0 commit comments

Comments
 (0)