Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
feat: add i2c multiplexer block (#152)
Browse files Browse the repository at this point in the history
feat: add gas sensor
  • Loading branch information
rmoesbergen authored Feb 10, 2024
1 parent fed4015 commit 499ce73
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@angular/router": "16.2.12",
"@blockly/workspace-backpack": "^5.3.3",
"@fortawesome/fontawesome-free": "^6.1.1",
"@leaphy-robotics/leaphy-blocks": "1.11.1",
"@leaphy-robotics/leaphy-blocks": "^1.12.1",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
"@serialport/parser-readline": "^10.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/state/app.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Stk500v2 from "../services/arduino-uploader/protocols/stk500v2";
export class AppState {
/* eslint-disable max-len */
private static defaultLibraries = [
'Leaphy Original Extension', 'Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor', 'List'
'Leaphy Original Extension', 'Leaphy Extra Extension', 'Servo', 'Adafruit GFX Library', 'Adafruit SSD1306', 'Adafruit LSM9DS1 Library', 'Adafruit Unified Sensor', 'List', 'Adafruit SGP30 Sensor'
]
private static leaphyOriginalRobotType = new RobotType('l_original_uno', Stk500v1, 'Leaphy Original', 'orig.svg', 'Arduino UNO', 'arduino:avr:uno', 'hex', 'arduino:avr',
AppState.defaultLibraries.concat(['QMC5883LCompass', 'Arduino_APDS9960']), true, {
Expand Down
18 changes: 18 additions & 0 deletions src/assets/blockly/leaphy-toolbox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<block type="leaphy_compass_degrees">
</block>
<sep gap="8"></sep>
<block type="leaphy_gas_sensor">
</block>
<sep gap="8"></sep>
<block type="leaphy_i2c_rgb_color">
</block>
<sep gap="8"></sep>
Expand Down Expand Up @@ -163,6 +166,9 @@
<block type="leaphy_compass_degrees">
</block>
<sep gap="8"></sep>
<block type="leaphy_gas_sensor">
</block>
<sep gap="8"></sep>
<block type="leaphy_i2c_rgb_color">
</block>
<sep gap="8"></sep>
Expand Down Expand Up @@ -195,6 +201,9 @@
<block type="leaphy_compass_degrees">
</block>
<sep gap="8"></sep>
<block type="leaphy_gas_sensor">
</block>
<sep gap="8"></sep>
<block type="leaphy_i2c_rgb_color">
</block>
<block type="leaphy_i2c_gesture">
Expand Down Expand Up @@ -223,6 +232,9 @@
<sep gap="8"></sep>
<block type="leaphy_compass_degrees">
</block>
<sep gap="8"></sep>
<block type="leaphy_gas_sensor">
</block>
<sep gap="8"></sep>
<block type="leaphy_i2c_rgb_color">
</block>
Expand Down Expand Up @@ -1113,6 +1125,7 @@
</block>
</category>
<category id="l_nano" toolboxitemid="l_nano_sensors" name="%{BKY_SENSOREN_CATEGORY}" categorystyle="leaphy_category">
<block type="i2c_use_channel"></block>
<block type="leaphy_original_get_distance">
</block>
<sep gap="8"></sep>
Expand All @@ -1132,6 +1145,9 @@
<block type="leaphy_compass_degrees">
</block>
<sep gap="8"></sep>
<block type="leaphy_gas_sensor">
</block>
<sep gap="8"></sep>
<block type="leaphy_i2c_rgb_color">
</block>
<sep gap="8"></sep>
Expand Down Expand Up @@ -1361,5 +1377,7 @@
<sep gap="8"></sep>
<block type="leaphy_display_display">
</block>
<block type="i2c_use_channel"></block>
<sep gap="8"></sep>
</category>
</xml>
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1828,10 +1828,10 @@
resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60"
integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==

"@leaphy-robotics/leaphy-blocks@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@leaphy-robotics/leaphy-blocks/-/leaphy-blocks-1.11.1.tgz#88d7edc7c546a19acfb491f349a58d7a3d365eab"
integrity sha512-/XnZJNX5rXt10vOrcUgvgeKPBYwQoTF+MUxVUM0trQ0URUQEEZfP3u7ISrthd+lX9Oc10oQylmLeAc1zcHg3Og==
"@leaphy-robotics/leaphy-blocks@^1.12.1":
version "1.12.1"
resolved "https://registry.yarnpkg.com/@leaphy-robotics/leaphy-blocks/-/leaphy-blocks-1.12.1.tgz#4058999b7bdeccdc006d516f47dbf601ded0393f"
integrity sha512-Btcf5Tnp7aXCACAs3uODP8hxJcz4is4zZTgl+q4RDOEM5lb1wdcWZ3DJGrgN+GOfcZlxGqqrRdU/gBE2x4Mdeg==
dependencies:
blockly "^10.1.3"
typescript "4.3.2"
Expand Down

0 comments on commit 499ce73

Please sign in to comment.