Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
286244a
init mcu-s2 integration
mariopesch Jul 28, 2023
630c536
change senseBoxIO Library integration
mariopesch Nov 10, 2023
a4466cf
add new images
mariopesch Nov 23, 2023
b9a47ee
add option to edit compiler url
mariopesch Dec 11, 2023
c5938e3
add new blocks
mariopesch Dec 11, 2023
b8cda38
remove matomo
mariopesch Dec 12, 2023
d5da6b3
fix #250
mariopesch Dec 12, 2023
688e0ab
remove internal rtc from esp toolbox
mariopesch Dec 28, 2023
4a6e217
add board to xml
mariopesch Jan 29, 2024
fc28b4b
add AP block and code
mariopesch Jan 29, 2024
2b3b010
Merge branch 'main' into dev/add-mcus2
mariopesch Jan 29, 2024
f0e4dce
added quotation around WIFI.AP, fixes #260
Thiemann96 Jan 30, 2024
70c0460
Added PD text, closes #256
Thiemann96 Jan 30, 2024
a825b1d
allows osem block to be used in switch case, refs #255
Thiemann96 Jan 30, 2024
85c7dac
add switch case to LOOP_TYPES
mariopesch Jan 31, 2024
eb0d852
added sd support for mcus2, refs #258
Thiemann96 Feb 1, 2024
d7ceee1
added esp32 open file version to osem sd save
Thiemann96 Feb 1, 2024
d2d25aa
use compiler url from .env, closes #249
Thiemann96 Feb 1, 2024
773dd64
fixed various sd issue, added wifi blocks, #258 #259
Thiemann96 Feb 1, 2024
3180007
Merge pull request #246 from sensebox/dev/add-mcus2
mariopesch Feb 1, 2024
c81c204
fix sd example
Thiemann96 Feb 5, 2024
236f424
add blocks for the led matrix
mariopesch Feb 12, 2024
2125e43
update LED Matrix Blocks
mariopesch Feb 14, 2024
8f5ac6f
Merge pull request #263 from sensebox/add/mcus2_wifiap
Thiemann96 Feb 15, 2024
9a2f19a
add tof imager
Thiemann96 Feb 15, 2024
461d1e2
Merge pull request #273 from sensebox/add/tof_sensor
Thiemann96 Feb 16, 2024
e37c8ce
added osem for esp32 block and compability
Thiemann96 Feb 16, 2024
7bbda27
Merge branch 'development' into block/add-led-matrix
mariopesch Feb 16, 2024
a8b9c6b
Merge pull request #274 from sensebox/fix/osemUploadS2
Thiemann96 Feb 21, 2024
68ca724
removed server section from the access point, fixes #262
Thiemann96 Feb 21, 2024
c7d0d70
added texts for enterprise block
Thiemann96 Feb 21, 2024
b6e5c93
added ssl support for upload to osem
Thiemann96 Feb 22, 2024
bc229ba
Merge pull request #278 from sensebox/fix/issue-262
Thiemann96 Feb 23, 2024
1bebb38
Merge pull request #277 from sensebox/add/wpa2block
Thiemann96 Feb 23, 2024
6992b3f
change compiling message to a gif of a drag & drop
Thiemann96 Feb 23, 2024
ac4db56
add english translation for enterprise wifi
Thiemann96 Feb 23, 2024
072f758
fix typo where " was not closed
Thiemann96 Feb 23, 2024
101ea29
change gif to image
Thiemann96 Feb 23, 2024
45446dc
Merge pull request #280 from sensebox/fix/wifenterprise
Thiemann96 Feb 23, 2024
3c0839e
add some led matrix blocks
mariopesch Feb 29, 2024
8f57cfa
add string length check
mariopesch Mar 8, 2024
784b193
Merge pull request #282 from sensebox/fix/fix-phyphox-mcus2
felixerdy Mar 8, 2024
cdb39fd
fix RGB888 to RGB565
PaulaScharf Mar 12, 2024
4b2411e
add english and fix and add more bitmaps
PaulaScharf Mar 12, 2024
35bd750
implement scrolling text
PaulaScharf Mar 13, 2024
173a37b
autoscroll toggleable
PaulaScharf Mar 13, 2024
b73b085
add text color option
PaulaScharf Mar 13, 2024
9365d1a
update label
mariopesch Mar 18, 2024
105e735
Merge branch 'development' into block/add-led-matrix
mariopesch Mar 18, 2024
15b234e
Merge pull request #270 from sensebox/block/add-led-matrix
mariopesch Mar 18, 2024
6e6b892
fixed error where sdspi was only created locally
Thiemann96 Mar 19, 2024
72564a5
Merge pull request #283 from sensebox/fix/sdcard
Thiemann96 Mar 19, 2024
7d51abd
Merge pull request #279 from sensebox/dev/changeCompilingImage
Thiemann96 Mar 19, 2024
c8ef0d7
add first code outline
PaulaScharf Mar 19, 2024
221f065
implement first draft of generators
PaulaScharf Mar 20, 2024
56cdea7
fixed mac address and added some todos
PaulaScharf Mar 20, 2024
93dacc8
received message should be dropdown
PaulaScharf Mar 20, 2024
70b72b8
fix variable name for text appending
PaulaScharf Mar 20, 2024
886de96
format mac address
PaulaScharf Mar 20, 2024
d42276d
move esp-now translations to seperate file
PaulaScharf Mar 20, 2024
654d448
basic many to many communication
PaulaScharf Mar 21, 2024
5e20ba1
restrict message sending to string
PaulaScharf Mar 21, 2024
ddb1b18
saving board as xml attribute
Thiemann96 Mar 22, 2024
f18a81a
allow other types of message contents
PaulaScharf Mar 22, 2024
3c5e420
Merge pull request #284 from sensebox/block/add-esp-now
mariopesch Mar 22, 2024
22cff07
on load reads the board tag and warns the user if its not matching wi…
Thiemann96 Mar 22, 2024
4f682a3
seperated LED and LED Matrix and changed description of the onBoard R…
Thiemann96 Mar 22, 2024
f67bb6f
fixed a translation bug
Thiemann96 Mar 22, 2024
3dd4ec7
Merge pull request #286 from sensebox/fix/rgbdescriptions
Thiemann96 Mar 22, 2024
352e18f
Merge pull request #285 from sensebox/add/xmlBoardSupport
Thiemann96 Mar 22, 2024
bb13cbc
trigger rebuild
Thiemann96 Mar 22, 2024
eae4ae1
added translations for error messages in upload
Thiemann96 Mar 22, 2024
d88ee47
english support
Thiemann96 Mar 22, 2024
e1bf8f6
Merge pull request #287 from sensebox/fix/translationerrors
Thiemann96 Mar 22, 2024
b786d3b
forgot title of dialog box
Thiemann96 Mar 22, 2024
43bf179
Merge pull request #288 from sensebox/hotfix_translat
Thiemann96 Mar 22, 2024
976cd32
adjust board when loading a different programmcode
mariopesch Mar 22, 2024
1ca345e
change compiler back to produktive
mariopesch Mar 22, 2024
a8ffd71
Merge pull request #290 from sensebox/dev/change-compilerURL
mariopesch Mar 22, 2024
175647d
add ToF bitmap output
PaulaScharf Mar 25, 2024
92018da
Merge pull request #291 from sensebox/block/tof-matrix-output
mariopesch Mar 25, 2024
0e9a059
Merge pull request #289 from sensebox/fix/adjust-board-onload
mariopesch Mar 25, 2024
035a8bf
adjustable maxDistance for bitmap
PaulaScharf Mar 27, 2024
a6e832e
bitmap as output and for input checks
PaulaScharf Mar 27, 2024
9e86f76
change name of max distance
PaulaScharf Mar 28, 2024
095136e
set output of tof imager depending on option
PaulaScharf Mar 28, 2024
afceaee
fix type checks and output of custom bitmap
PaulaScharf Mar 28, 2024
f6fc213
different code blocks depending on option
PaulaScharf Mar 29, 2024
2473d90
fix displaying decimals on led matrix
PaulaScharf Mar 29, 2024
adfb14c
Merge pull request #294 from sensebox/add/tof_bitmap_handling
PaulaScharf Apr 2, 2024
29533f1
adjust title, description of ToF Imager
PaulaScharf Apr 2, 2024
3625a78
update tooltips
PaulaScharf Apr 2, 2024
6980c67
add clearing of LED Matrix
PaulaScharf Apr 2, 2024
d1d54f2
fix clearing of led matrix
PaulaScharf Apr 3, 2024
e617424
adjust tooltips
PaulaScharf Apr 3, 2024
8185b92
adjust compiler text
PaulaScharf Apr 3, 2024
858d1f4
temp fix for draw bitmap text
PaulaScharf Apr 3, 2024
e26424b
Merge pull request #295 from sensebox/fix/ToF_text
PaulaScharf Apr 3, 2024
6e6a7d4
Merge pull request #296 from sensebox/add/new-compiler-text
PaulaScharf Apr 3, 2024
bb83fd6
add digital pins led matrix for other boards
PaulaScharf Apr 3, 2024
bb21d67
padding and different text depending on board
PaulaScharf Apr 5, 2024
62944a1
retrigger checks
PaulaScharf Apr 5, 2024
ed8e4b7
Merge pull request #299 from sensebox/fix/better-compiler-text
mariopesch Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"not dead",
"not op_mini all"
],
"bundleDependencies": [
"@babel/plugin-proposal-private-property-in-object"
]
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
}
}
7 changes: 0 additions & 7 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<!-- Matomo Image Tracker-->
<img
src="https://piwik.sensebox.kaufen/matomo.php?idsite=9&amp;rec=1"
style="border: 0; display: none"
alt=""
/>
<!-- End Matomo -->
<div id="root"></div>
<!--
This HTML file is a template.
Expand Down
Binary file added public/media/hardware/blockly_esp.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 public/media/hardware/blockly_mcu.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 public/media/hardware/blockly_mini.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 public/media/hardware/senseboxmcuesp32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 15 additions & 2 deletions src/actions/boardAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,26 @@ import {
} from "./types";
import mini_opacity from "../data/mini_opacity.png"
import mcu_opacity from "../data/mcu_opacity.png"
import esp_opacity from "../data/esp_opacity.png"

export const setBoard = (board) => (dispatch) => {
window.sessionStorage.setItem("board", board);
const root = document.querySelector(':root');
root.style.setProperty('--url', `url(${board === "mcu" ? mcu_opacity : mini_opacity})`);
switch (board) {
case "mcu":
root.style.setProperty('--url', `url(${mcu_opacity})`);
break;
case "mini":
root.style.setProperty('--url', `url(${mini_opacity})`);
break;
case "esp32":
root.style.setProperty('--url', `url(${esp_opacity})`);
break;
default:
break;
}
dispatch({
type: BOARD,
payload: board,
});
};
};
8 changes: 8 additions & 0 deletions src/actions/generalActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
SOUNDS,
STATISTICS,
PLATFORM,
COMPILER
} from "./types";

export const visitPage = () => (dispatch) => {
Expand Down Expand Up @@ -50,3 +51,10 @@ export const setStatistics = (showStatistics) => (dispatch) => {
payload: showStatistics,
});
};

export const setCompiler = (compiler) => (dispatch) => {
dispatch({
type: COMPILER,
payload: compiler,
});
};
2 changes: 1 addition & 1 deletion src/actions/tutorialBuilderActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const tutorialReview = (review) => (dispatch) => {
type: BUILDER_REVIEW,
payload: review,
});
dispatch(changeTutorialBuilder());
dispatch(changeTutorialBuilder());
};

export const tutorialSteps = (steps) => (dispatch) => {
Expand Down
1 change: 1 addition & 0 deletions src/actions/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const PLATFORM = "PLATFORM";
export const RENDERER = "RENDERER";
export const SOUNDS = "SOUNDS";
export const STATISTICS = "STATISTICS";
export const COMPILER = "COMPILER";

// messages
export const GET_ERRORS = "GET_ERRORS";
Expand Down
2 changes: 2 additions & 0 deletions src/actions/workspaceActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const onChangeCode = () => (dispatch, getState) => {
var code = getState().workspace.code;
code.arduino = Blockly.Arduino.workspaceToCode(workspace);
var xmlDom = Blockly.Xml.workspaceToDom(workspace);
var board = getState().board.board
xmlDom.setAttribute('board', board)
code.xml = Blockly.Xml.domToPrettyText(xmlDom);
var selectedBlock = Blockly.getSelected();
if (selectedBlock !== null) {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Blockly/BlocklyWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ class BlocklyWindow extends Component {
if(!xml) xml = initialXml;
var xmlDom = Blockly.Xml.textToDom(xml);
Blockly.Xml.clearWorkspaceAndLoadFromXml(xmlDom, workspace);
// var toolbox = workspace.getToolbox();
// workspace.updateToolbox(toolbox.toolboxDef_);

}

// if svg is true, then the update process is done in the BlocklySvg component
Expand Down
1 change: 1 addition & 0 deletions src/components/Blockly/blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "./sensebox-sensors";
import "./sensebox-telegram";
import "./sensebox-osem";
import "./sensebox-web";
import "./sensebox-esp-now";
import "./sensebox-display";
import "./sensebox-motors";
import "./sensebox-lora";
Expand Down
4 changes: 4 additions & 0 deletions src/components/Blockly/blocks/procedures.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ import * as Blockly from 'blockly/core';
import { getColour } from '../helpers/colour';
import * as Types from '../helpers/types';



Blockly.Blocks['arduino_functions'] = {
/**
* Block for defining the Arduino setup() and loop() functions.
* @this Blockly.Block
*/
init: function () {
var board = window.sessionStorage.getItem("board");
this.appendDummyInput()
.appendField(Blockly.Msg.ARD_FUN_RUN_SETUP);
this.appendStatementInput('SETUP_FUNC');
Expand All @@ -30,6 +33,7 @@ Blockly.Blocks['arduino_functions'] = {
this.setTooltip(Blockly.Msg.ARD_FUN_RUN_TIP);
this.setHelpUrl('https://arduino.cc/en/Reference/Loop');
this.contextMenu = false;
this.data = board;
},
/** @return {!boolean} True if the block instance is in the workspace. */
getArduinoLoopsInstance: function () {
Expand Down
69 changes: 65 additions & 4 deletions src/components/Blockly/blocks/sensebox-ble.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
import * as Blockly from "blockly";
import { getColour } from "../helpers/colour";


var checkUnitLength = function (unit) {
var length = unit.length;
if (length > 5) {
alert("Die Einheit muss kleiner als 6 Zeichen sein");
return unit.slice(0, 5);
}
return unit;
};

var checkLabelLength = function (label) {
var length = label.length;
if (length > 20) {
alert("Das Label muss kleiner als 20 Zeichen sein");
return label.slice(0, 20);
}
return label;
};


Blockly.Blocks["sensebox_phyphox_init"] = {
init: function () {
this.setColour(getColour().phyphox);
Expand Down Expand Up @@ -51,16 +71,16 @@ Blockly.Blocks["sensebox_phyphox_graph"] = {
.appendField(new Blockly.FieldTextInput("Label"), "label");
this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_phyphox_unitx)
.appendField(new Blockly.FieldTextInput("Unit X"), "unitx");
.appendField(new Blockly.FieldTextInput("Unit", checkUnitLength), "unitx");
this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_phyphox_unity)
.appendField(new Blockly.FieldTextInput("Unit Y"), "unity");
.appendField(new Blockly.FieldTextInput("Unit", checkUnitLength), "unity");
this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_phyphox_labelx)
.appendField(new Blockly.FieldTextInput("Label X"), "labelx");
.appendField(new Blockly.FieldTextInput("Label X", checkLabelLength), "labelx");
this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_phyphox_labely)
.appendField(new Blockly.FieldTextInput("Label Y"), "labely");
.appendField(new Blockly.FieldTextInput("Label Y", checkLabelLength), "labely");
this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_phyphox_graphStyle)
.appendField(
Expand Down Expand Up @@ -150,3 +170,44 @@ Blockly.Blocks["sensebox_phyphox_experiment_send"] = {
this.setHelpUrl(Blockly.Msg.sensebox_phyphox_helpurl);
},
};

/**
* senseBox BLE
*
*
*/

Blockly.Blocks["sensebox_ble_init"] = {
init: function () {
this.setColour(getColour().senseboxble);
this.setHelpUrl(Blockly.Msg.sensebox_ble_helpurl);
this.appendDummyInput()
.appendField(Blockly.Msg.sensebox_ble_init)
.appendField(new Blockly.FieldTextInput("Geräte Name"), "devicename");

this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setTooltip(Blockly.Msg.sensebox_ble_init_tooltip);
},
};

Blockly.Blocks["sensebox_ble_send"] = {
init: function () {
this.setColour(getColour().senseboxble);
this.appendValueInput("value")
.appendField(Blockly.Msg.sensebox_ble_send)
.appendField(
new Blockly.FieldDropdown([
["1", "1"],
["2", "2"],
["3", "3"],
]),
"channel"
);

this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setTooltip(Blockly.Msg.sensebox_ble_send_tooltip);
this.setHelpUrl(Blockly.Msg.sensebox_ble_helpurl);
},
};
91 changes: 91 additions & 0 deletions src/components/Blockly/blocks/sensebox-esp-now.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import Blockly from "blockly";
import { getColour } from "../helpers/colour";
import * as Types from "../helpers/types";

Blockly.Blocks["sensebox_esp_now"] = {
init: function () {
this.appendDummyInput().appendField(
Blockly.Msg.senseBox_esp_now_tooltip
);
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setColour(getColour().sensebox);
this.setTooltip(Blockly.Msg.senseBox_esp_now_init_tooltip);
this.setHelpUrl("");
},
};

Blockly.Blocks["sensebox_esp_now_sender"] = {
init: function () {
this.setTooltip(Blockly.Msg.senseBox_esp_now_sender_tooltip);
this.setHelpUrl("");
this.setColour(getColour().sensebox);
this.appendDummyInput().appendField(Blockly.Msg.senseBox_esp_now_sender);
this.appendDummyInput()
.setAlign(Blockly.ALIGN_LEFT)
.appendField(Blockly.Msg.senseBox_esp_now_send_mac)
.appendField(new Blockly.FieldTextInput("00:00:00:00:00:00"), "mac-address");
this.setHelpUrl("");
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
},
};

Blockly.Blocks["sensebox_get_mac"] = {
init: function () {
this.setTooltip(Blockly.Msg.senseBox_wifi_mac_tooltip);
this.setColour(getColour().sensebox);
this.appendDummyInput().appendField(Blockly.Msg.senseBox_wifi_mac);
this.setOutput(true, Types.TEXT.typeName);
this.setHelpUrl(Blockly.Msg.senseBox_wifi_ip_helpurl);
},
};

Blockly.Blocks["sensebox_esp_now_receive"] = {
init: function () {
this.jsonInit({
"message0": Blockly.Msg.senseBox_esp_now_receive,
"args0": [
{
"type": "field_variable",
"name": "VAR",
"defaultType": Types.TEXT.typeName,
"variable": "message"
// TODO check type?
},
{
"type": "field_variable",
"name": "MAC",
"defaultType": Types.TEXT.typeName,
"variable": "mac_address"
// TODO check type?
},
],
});
this.appendStatementInput('DO')
.appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setTooltip(Blockly.Msg.senseBox_esp_now_receive_tooltip);
this.setColour(getColour().sensebox);
this.setHelpUrl(Blockly.Msg.senseBox_wifi_ip_helpurl);
},
};

Blockly.Blocks["sensebox_esp_now_send"] = {
init: function () {
this.appendDummyInput()
.appendField(Blockly.Msg.senseBox_esp_now_send);
this.appendDummyInput()
.appendField(Blockly.Msg.senseBox_esp_now_send_mac)
.appendField(Blockly.Msg.senseBox_mac_address)
.appendField(new Blockly.FieldTextInput("00:00:00:00:00:00"), "mac-address");
this.appendValueInput("value")
.appendField(Blockly.Msg.senseBox_esp_now_send_message);
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.setTooltip(Blockly.Msg.senseBox_esp_now_send_tooltip);
this.setColour(getColour().sensebox);
this.setHelpUrl(Blockly.Msg.senseBox_wifi_ip_helpurl);
},
};
Loading