Skip to content

Commit

Permalink
feat: add more helpUrls
Browse files Browse the repository at this point in the history
  • Loading branch information
koen1711 committed Dec 15, 2024
1 parent 482aa76 commit a995d13
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 12 deletions.
26 changes: 19 additions & 7 deletions src/blocks/arduino.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const blocks: BlockDefinition = [
],
style: "leaphy_blocks",
output: "Number",
helpUrl: "",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Ambient%20light%20sensor",
},
{
type: "leaphy_i2c_gesture",
Expand All @@ -170,6 +170,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_led_set_strip",

message0:
"%%{BKY_LEAPHY_LED_SET_STRIP} %1 %%{BKY_LEAPHY_LED_SET_PIN} %2 %%{BKY_LEAPHY_LED_SET_LEDS} %3",
args0: [
Expand All @@ -181,7 +182,7 @@ const blocks: BlockDefinition = [
previousStatement: null,
nextStatement: null,
style: "leaphy_blocks",
helpUrl: "",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Potmeter-,Multiple%20leds%C2%A0,-Led%20matrix%C2%A0",
},
{
type: "leaphy_led_set_basic",
Expand All @@ -205,7 +206,7 @@ const blocks: BlockDefinition = [
previousStatement: null,
nextStatement: null,
style: "leaphy_blocks",
helpUrl: "",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Oled%20display-,RGB%20led,-Potmeter",
},
{
type: "leaphy_led_set_speed",
Expand All @@ -221,7 +222,7 @@ const blocks: BlockDefinition = [
previousStatement: null,
nextStatement: null,
style: "leaphy_blocks",
helpUrl: "",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Oled%20display-,RGB%20led,-Potmeter",
},
{
type: "leaphy_display_clear",
Expand Down Expand Up @@ -382,21 +383,22 @@ const blocks: BlockDefinition = [
nextStatement: null,
style: "leaphy_blocks",
tooltip: "%{BKY_USE_I2C_CHANNEL_TOOLTIP}",
helpUrl: "",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Batteries%20and%20power-,I2C%20sensor%20module%C2%A0,-Sensors",
},
{
type: "i2c_list_devices",
message0: "%{BKY_I2C_LIST_DEVICES}",
previousStatement: null,
nextStatement: null,
style: "leaphy_blocks",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Batteries%20and%20power-,I2C%20sensor%20module%C2%A0,-Sensors"
},
{
type: "leaphy_tof_get_distance",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Light%20sensor-,ToF%20sensor%C2%A0,-Infrared%20sensor",
message0: "%%{BKY_LEAPHY_TOF_GET_DISTANCE}",
style: "leaphy_blocks",
output: "Number",
helpUrl: "",
},
{
type: "leaphy_get_air_pressure",
Expand All @@ -407,6 +409,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_segment_set",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=%C2%A0Single%20leds-,Segment%20display%C2%A0,-Oled%20display",
message0: `%{BKY_LEAPHY_SEGMENT_SET}`,
args0: [
{
Expand All @@ -421,13 +424,15 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_segment_clear",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=%C2%A0Single%20leds-,Segment%20display%C2%A0,-Oled%20display",
message0: "%{BKY_LEAPHY_SEGMENT_CLEAR}",
previousStatement: null,
nextStatement: null,
style: "leaphy_blocks",
},
{
type: "leaphy_segment_set_brightness",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=%C2%A0Single%20leds-,Segment%20display%C2%A0,-Oled%20display",
message0: "%{BKY_LEAPHY_SEGMENT_SET_BRIGHTNESS}",
args0: [
{
Expand All @@ -442,6 +447,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_matrix_set",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Multiple%20leds-,Led%20matrix%C2%A0,-Speaker%C2%A0",
message0: "%{BKY_LEAPHY_MATRIX_SET}",
args0: [
{
Expand All @@ -467,6 +473,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_matrix_set_brightness",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Multiple%20leds-,Led%20matrix%C2%A0,-Speaker%C2%A0",
message0: "%{BKY_LEAPHY_MATRIX_SET_BRIGHTNESS}",
args0: [
{
Expand All @@ -481,13 +488,15 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_matrix_clear",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Multiple%20leds-,Led%20matrix%C2%A0,-Speaker%C2%A0",
message0: "%{BKY_LEAPHY_MATRIX_CLEAR}",
previousStatement: null,
nextStatement: null,
style: "leaphy_blocks",
},
{
type: "leaphy_matrix_fill",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Multiple%20leds-,Led%20matrix%C2%A0,-Speaker%C2%A0",
message0: "%{BKY_LEAPHY_MATRIX_FILL}",
args0: [
{ type: "input_dummy" },
Expand All @@ -504,6 +513,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_sound_play",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Led%20matrix-,Speaker,-Stichting",
message0: "%{BKY_LEAPHY_SOUND_PLAY}",
args0: [
{
Expand All @@ -519,13 +529,15 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_sound_stop",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Led%20matrix-,Speaker,-Stichting",
message0: "%{BKY_LEAPHY_SOUND_STOP}",
previousStatement: null,
nextStatement: null,
style: "leaphy_blocks",
},
{
type: "leaphy_sound_set_volume",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Led%20matrix-,Speaker,-Stichting",
message0: "%{BKY_LEAPHY_SOUND_SET_VOLUME}",
args0: [
{
Expand All @@ -541,6 +553,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_led_strip_demo",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Potmeter-,Multiple%20leds%C2%A0,-Led%20matrix%C2%A0",
message0: "%%{BKY_LEAPHY_LED_STRIP_DEMO} %1 %2 %3 %4 %5",
args0: [
{
Expand Down Expand Up @@ -569,7 +582,6 @@ const blocks: BlockDefinition = [
previousStatement: null,
nextStatement: null,
style: "leaphy_blocks",
helpUrl: "",
},
];

Expand Down
4 changes: 2 additions & 2 deletions src/blocks/leaphy_click.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const blocks: BlockDefinition = [
previousStatement: null,
nextStatement: null,
style: "leaphy_blocks",
helpUrl: "",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=types%20of%20leds-,TT%20motors,-Servo%20motors",
},
{
type: "leaphy_click_rgb_digitalwrite",
Expand Down Expand Up @@ -74,7 +74,7 @@ const blocks: BlockDefinition = [
nextStatement: null,
style: "leaphy_blocks",
// "extensions": "refreshPinFields",
helpUrl: "",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Different%20types%20of%20leds",
},
];

Expand Down
9 changes: 6 additions & 3 deletions src/blocks/leaphy_common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const blocks: BlockDefinition = [
nextStatement: null,
style: "leaphy_blocks",
// "extensions": "refreshServoPinFields",
helpUrl: "http://arduino.cc/en/Reference/ServoWrite",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=TT%20motors-,Servo%20motors,-Rotating%20servo%20motor",
},
{
type: "leaphy_servo_read",
Expand All @@ -62,7 +62,7 @@ const blocks: BlockDefinition = [
output: "Number",
style: "leaphy_blocks",
// "extensions": "returnAndUpdateServoRead",
helpUrl: "http://arduino.cc/en/Reference/ServoRead",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=TT%20motors-,Servo%20motors,-Rotating%20servo%20motor",
},
{
type: "leaphy_io_digitalwrite",
Expand Down Expand Up @@ -137,11 +137,12 @@ const blocks: BlockDefinition = [
],
output: "Number",
style: "leaphy_blocks",
helpUrl: "",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Programming-,Ultrasonic%20sensor,-Light%20sensor",
},

{
type: "leaphy_segment_init",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=%C2%A0Single%20leds-,Segment%20display%C2%A0,-Oled%20display",
message0: "%{BKY_LEAPHY_SEGMENT_INIT}",
args0: [
{
Expand All @@ -161,6 +162,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_matrix_init",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Multiple%20leds-,Led%20matrix%C2%A0,-Speaker%C2%A0",
message0: "%{BKY_LEAPHY_MATRIX_INIT}",
args0: [
{
Expand All @@ -185,6 +187,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_sound_init",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Led%20matrix-,Speaker%C2%A0,-Stichting",
message0: "%{BKY_LEAPHY_SOUND_INIT}",
args0: [
{
Expand Down
5 changes: 5 additions & 0 deletions src/blocks/leaphy_flitz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,29 @@ const blocks: BlockDefinition = [
options: stomachSensorOptions,
},
],
helpUrl: "https://www.leaphy.nl/leaphy-flitz.html#:~:text=het%20licht%20wordt.-,Bouwfilmpjes%20Leaphy%20Flitz,-Software%20Leaphy%20Flitz",
output: "Number",
style: "leaphy_blocks",
},
{
type: "leaphy_flitz_nano_read_stomach_sensor",
message0: "%%{BKY_LEAPHY_READ_STOMACH}",
output: "Number",
helpUrl: "https://www.leaphy.nl/leaphy-flitz.html#:~:text=het%20licht%20wordt.-,Bouwfilmpjes%20Leaphy%20Flitz,-Software%20Leaphy%20Flitz",
style: "leaphy_blocks",
},
{
type: "leaphy_flitz_read_hand_sensor",
message0: "%%{BKY_LEAPHY_READ_HAND}",
output: "Number",
helpUrl: "https://www.leaphy.nl/leaphy-flitz.html#:~:text=het%20licht%20wordt.-,Bouwfilmpjes%20Leaphy%20Flitz,-Software%20Leaphy%20Flitz",
style: "leaphy_blocks",
},
{
type: "leaphy_flitz_nano_read_hand_sensor",
message0: "%%{BKY_LEAPHY_READ_HAND}",
output: "Number",
helpUrl: "https://www.leaphy.nl/leaphy-flitz.html#:~:text=het%20licht%20wordt.-,Bouwfilmpjes%20Leaphy%20Flitz,-Software%20Leaphy%20Flitz",
style: "leaphy_blocks",
},
{
Expand All @@ -50,6 +54,7 @@ const blocks: BlockDefinition = [
inputsInline: true,
previousStatement: null,
nextStatement: null,
helpUrl: "https://www.leaphy.nl/leaphy-flitz.html#:~:text=het%20licht%20wordt.-,Bouwfilmpjes%20Leaphy%20Flitz,-Software%20Leaphy%20Flitz",
style: "leaphy_blocks",
},
];
Expand Down
6 changes: 6 additions & 0 deletions src/blocks/leaphy_original.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const motorForwardBackwardDropdown = [
const blocks: BlockDefinition = [
{
type: "leaphy_original_set_led",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Different%20types%20of%20leds",
message0:
"%%{BKY_LEAPHY_LED} %1 %%{BKY_LEAPHY_LED_RED} %2 %%{BKY_LEAPHY_LED_GREEN} %3 %%{BKY_LEAPHY_LED_BLUE} %4",
args0: [
Expand All @@ -37,6 +38,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_original_set_motor",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=types%20of%20leds-,TT%20motors,-Servo%20motors",
message0:
"%%{BKY_LEAPHY_MOTOR_TYPE} %1 %2 %%{BKY_LEAPHY_MOTOR_SPEED} %3",
args0: [
Expand All @@ -55,12 +57,14 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_original_get_distance",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=Programming-,Ultrasonic%20sensor,-Light%20sensor",
message0: "%%{BKY_LEAPHY_GET_DISTANCE}",
style: "leaphy_blocks",
output: "Number",
},
{
type: "leaphy_original_move_motors",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=types%20of%20leds-,TT%20motors,-Servo%20motors",
message0: "%%{BKY_LEAPHY_MOTOR_DIRECTION} %1 %2 %3",
args0: [
{
Expand Down Expand Up @@ -91,6 +95,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_original_servo_set",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=TT%20motors-,Servo%20motors,-Rotating%20servo%20motor",
message0: "%{BKY_LEAPHY_SERVO_SET}",
args0: [
{
Expand All @@ -114,6 +119,7 @@ const blocks: BlockDefinition = [
},
{
type: "leaphy_original_servo_move",
helpUrl: "https://www.leaphyfoundation.com/tutorials-leaphy-electronics.html#:~:text=TT%20motors-,Servo%20motors,-Rotating%20servo%20motor",
message0: "%{BKY_LEAPHY_SERVO_MOVE}",
args0: [
{
Expand Down

0 comments on commit a995d13

Please sign in to comment.