Merge branch 'development' into update/tutorial-builder
This commit is contained in:
commit
7bd85a4dc2
2
.gitignore
vendored
2
.gitignore
vendored
@ -22,4 +22,4 @@ npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
package-lock.json
|
||||
package-lock.json
|
||||
|
||||
|
@ -288,4 +288,17 @@ export const UI = {
|
||||
drawer_ideerror_head: "Hoppla da ist was schief gegangen.",
|
||||
drawer_ideerror_text:
|
||||
"Beim kompilieren ist ein Fehler aufgetreten, überprüfe deine Blöcke.",
|
||||
|
||||
/**
|
||||
* Code Editor
|
||||
* */
|
||||
codeeditor_libraries_head: "Installierte Arduino Libraries",
|
||||
codeeditor_libraries_text:
|
||||
"Für die Dokumentation sehen Sie sich die installierten Bibliotheken und deren Beispiele an",
|
||||
codeeditor_save_code: "Code herunterladen",
|
||||
codeeditor_open_code: "Code öffnen",
|
||||
codeeditor_reset_code: "Code zurücksetzen",
|
||||
codeeditor_blockly_code: "Lade Blockly Code",
|
||||
codeeditor_compile_progress:
|
||||
"Dein Code wird nun kompiliert und anschließend auf deinen Computer heruntergeladen",
|
||||
};
|
||||
|
@ -283,4 +283,17 @@ export const UI = {
|
||||
*/
|
||||
drawer_ideerror_head: "Oops something went wrong",
|
||||
drawer_ideerror_text: "An error occurred while compiling, check your blocks",
|
||||
|
||||
/**
|
||||
* Code Editor
|
||||
* */
|
||||
codeeditor_libraries_head: "Installed Arduino Libraries",
|
||||
codeeditor_libraries_text:
|
||||
"For documentation, view the installed libraries and their examples",
|
||||
codeeditor_save_code: "Download code",
|
||||
codeeditor_open_code: "Open code",
|
||||
codeeditor_reset_code: "Reset code",
|
||||
codeeditor_blockly_code: "Load blockly code",
|
||||
codeeditor_compile_progress:
|
||||
"Your code will now be compiled and then downloaded to your computer",
|
||||
};
|
||||
|
@ -177,15 +177,15 @@ void loop() {
|
||||
localStorage.getItem("ArduinoCode")
|
||||
? localStorage.getItem("ArduinoCode")
|
||||
: `
|
||||
#include <senseBoxIO.h> //needs to be always included
|
||||
#include <senseBoxIO.h> //needs to be always included
|
||||
|
||||
void setup () {
|
||||
void setup () {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
void loop() {
|
||||
|
||||
}`
|
||||
}`
|
||||
}
|
||||
value={fileContent}
|
||||
onMount={(editor, monaco) => {
|
||||
@ -208,7 +208,7 @@ void loop() {
|
||||
color="primary"
|
||||
onClick={() => saveIno()}
|
||||
>
|
||||
Save Code
|
||||
{Blockly.Msg.codeeditor_save_code}
|
||||
</Button>
|
||||
<Button
|
||||
style={{ padding: "1rem", margin: "1rem" }}
|
||||
@ -216,7 +216,7 @@ void loop() {
|
||||
color="primary"
|
||||
onClick={() => openIno()}
|
||||
>
|
||||
Open Code
|
||||
{Blockly.Msg.codeeditor_open_code}
|
||||
</Button>
|
||||
<Button
|
||||
style={{ padding: "1rem", margin: "1rem" }}
|
||||
@ -224,7 +224,7 @@ void loop() {
|
||||
color="primary"
|
||||
onClick={() => setResetDialog(true)}
|
||||
>
|
||||
Reset Editor
|
||||
{Blockly.Msg.codeeditor_reset_code}
|
||||
</Button>
|
||||
<Button
|
||||
style={{ padding: "1rem", margin: "1rem" }}
|
||||
@ -232,7 +232,7 @@ void loop() {
|
||||
color="primary"
|
||||
onClick={() => getBlocklyCode()}
|
||||
>
|
||||
getBlocklyCode
|
||||
{Blockly.Msg.codeeditor_blockly_code}
|
||||
</Button>
|
||||
<Sidebar />
|
||||
<Dialog
|
||||
@ -243,10 +243,7 @@ void loop() {
|
||||
title={"Code wird kompiliert"}
|
||||
content={""}
|
||||
>
|
||||
<div>
|
||||
Dein Code wird nun kompiliert und anschließend auf deinen Computer
|
||||
heruntergeladen
|
||||
</div>
|
||||
<div>{Blockly.Msg.codeeditor_compile_progress}</div>
|
||||
</Dialog>{" "}
|
||||
<Dialog
|
||||
open={resetDialog}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useEffect } from "react";
|
||||
import React from "react";
|
||||
import Blockly from "blockly";
|
||||
import { useSelector } from "react-redux";
|
||||
import Accordion from "@material-ui/core/Accordion";
|
||||
@ -6,22 +6,27 @@ import AccordionSummary from "@material-ui/core/AccordionSummary";
|
||||
import AccordionDetails from "@material-ui/core/AccordionDetails";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import { LibraryVersions } from "../../data/versions.js";
|
||||
import { useMonaco } from "@monaco-editor/react";
|
||||
import { Button } from "@material-ui/core";
|
||||
//import { useMonaco } from "@monaco-editor/react";
|
||||
//import { Button } from "@material-ui/core";
|
||||
import Dialog from "../Dialog";
|
||||
import SerialMonitor from "./SerialMonitor.js";
|
||||
import axios from "axios";
|
||||
//import axios from "axios";
|
||||
|
||||
const Sidebar = () => {
|
||||
const [alert, setAlert] = React.useState(false);
|
||||
const [examples, setExamples] = React.useState([]);
|
||||
|
||||
//const [examples, setExamples] = React.useState([]);
|
||||
const user = useSelector((state) => state.auth.user);
|
||||
|
||||
const monaco = useMonaco();
|
||||
const loadCode = (code) => {
|
||||
monaco.editor.getModels()[0].setValue(code);
|
||||
};
|
||||
// useEffect(() => {
|
||||
// axios
|
||||
// .get("https://coelho.opensensemap.org/items/blocklysamples")
|
||||
// .then((res) => {
|
||||
// setExamples(res.data.data);
|
||||
// });
|
||||
// }, []);
|
||||
//const monaco = useMonaco();
|
||||
// const loadCode = (code) => {
|
||||
// monaco.editor.getModels()[0].setValue(code);
|
||||
// };
|
||||
|
||||
const toggleDialog = () => {
|
||||
setAlert(false);
|
||||
@ -113,7 +118,7 @@ const Sidebar = () => {
|
||||
aria-controls="panel2a-content"
|
||||
id="panel2a-header"
|
||||
>
|
||||
<Typography>Installierte Libraries</Typography>
|
||||
<Typography>{Blockly.Msg.codeeditor_libraries_head}</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails
|
||||
style={{ padding: 0, height: "60vH", backgroundColor: "white" }}
|
||||
@ -121,10 +126,7 @@ const Sidebar = () => {
|
||||
<Typography
|
||||
style={{ overflow: "auto", width: "100%", padding: "1rem" }}
|
||||
>
|
||||
<p>
|
||||
For Dokumentation take a look at the installed libraries and their
|
||||
source
|
||||
</p>
|
||||
<p>{Blockly.Msg.codeeditor_libraries_text}</p>
|
||||
{LibraryVersions().map((object, i) => {
|
||||
return (
|
||||
<p>
|
||||
|
@ -1,102 +1,151 @@
|
||||
export const LibraryVersions = () => {
|
||||
return [
|
||||
{
|
||||
version: "1.4.2",
|
||||
library: "sensebox/SenseBoxMCU-Lib",
|
||||
link: "https://github.com/sensebox/SenseBoxMCU-Lib",
|
||||
library: "SSD1306 Plot Library",
|
||||
link: "https://github.com/sensebox/SSD1306-Plot-Library/",
|
||||
},
|
||||
{
|
||||
version: "1.0.12",
|
||||
library: "sparkfun/SparkFun_SCD30_Arduino_Library",
|
||||
},
|
||||
{ version: "1.2.3", library: "adafruit/Adafruit-GFX-Library" },
|
||||
{
|
||||
version: "2.1.2",
|
||||
library: "adafruit/Adafruit_BME280_Library",
|
||||
library: "SDS011 Library",
|
||||
link: "https://github.com/sensebox/SDS011-select-serial/",
|
||||
},
|
||||
{
|
||||
version: "2.1.0",
|
||||
library: "adafruit/Adafruit_BMP280_Library",
|
||||
library: "RV8523 Arduino Library",
|
||||
link: "https://github.com/sensebox/RV8523-RTC-Arduino-Library",
|
||||
},
|
||||
{
|
||||
version: "1.1.1",
|
||||
library: "adafruit/Adafruit_BME680",
|
||||
library: "BMX055_Library",
|
||||
link: "https://github.com/sensebox/BMX055-Arduino-Library/",
|
||||
},
|
||||
{
|
||||
version: "2.0.1",
|
||||
library: "adafruit/Adafruit_BMP3XX",
|
||||
library: "LTR329",
|
||||
link: "https://github.com/sensebox/LTR329-Lightsensor-Arduino-Library/",
|
||||
},
|
||||
{
|
||||
version: "2.0.0",
|
||||
library: "adafruit/Adafruit_HDC1000_Library",
|
||||
library: "VEML6070",
|
||||
link: "https://github.com/sensebox/VEML6070-UV-Arduino-Library/",
|
||||
},
|
||||
{
|
||||
version: "1.7.1",
|
||||
library: "adafruit/Adafruit_BusIO",
|
||||
library: "senseBox Web Library",
|
||||
link: "https://github.com/sensebox/sensebox-libweb/",
|
||||
},
|
||||
{
|
||||
version: "1.0.6",
|
||||
library: "adafruit/Adafruit_NeoPixel",
|
||||
library: "Arduino WiFi101",
|
||||
link: "https://github.com/arduino-libraries/WiFi101",
|
||||
},
|
||||
{
|
||||
version: "1.1.2",
|
||||
library: "adafruit/Adafruit_SSD1306",
|
||||
library: "Ethernet",
|
||||
link: "https://github.com/arduino-libraries/Ethernet",
|
||||
},
|
||||
{
|
||||
version: "1.0.2",
|
||||
library: "adafruit/Adafruit_Sensor",
|
||||
library: "ArduinoJson",
|
||||
link: "https://github.com/bblanchon/ArduinoJson",
|
||||
},
|
||||
{
|
||||
version: "3.8.0",
|
||||
library: "milesburton/Arduino-Temperature-Control-Library",
|
||||
library: "Adafruit Sensor Library",
|
||||
link: "https://github.com/adafruit/Adafruit_Sensor",
|
||||
},
|
||||
{
|
||||
version: "1.5.0",
|
||||
library: "arduino-libraries/ArduinoBearSSL",
|
||||
library: "Adafruit HDC1000 Library",
|
||||
link: "https://github.com/adafruit/Adafruit_HDC1000_Library",
|
||||
},
|
||||
{
|
||||
version: "1.3.4",
|
||||
library: "arduino-libraries/ArduinoECCX08",
|
||||
library: "Adafruit BME280 Library",
|
||||
link: "https://github.com/adafruit/Adafruit_BME280_Library",
|
||||
},
|
||||
{
|
||||
version: "2.0.0",
|
||||
library: "arduino-libraries/ArduinoECCX08", //todo
|
||||
library: "Adafruit BMP280 Library",
|
||||
link: "https://github.com/adafruit/Adafruit_BMP280_Library",
|
||||
},
|
||||
{
|
||||
version: "0.7.1",
|
||||
library: "cmaglie/FlashStorage",
|
||||
library: "Adafruit BME680 Library",
|
||||
link: "https://github.com/adafruit/Adafruit_BME680",
|
||||
},
|
||||
{
|
||||
version: "1.5.1",
|
||||
library: "matthijskooijman/arduino-lmic",
|
||||
library: "Adafruit DPS310",
|
||||
link: "https://github.com/adafruit/Adafruit_DPS310",
|
||||
},
|
||||
{
|
||||
version: "3.0.1",
|
||||
library: "thesolarnomad/lora-serialization ",
|
||||
library: "Adafruit NeoPixel",
|
||||
link: "https://github.com/adafruit/Adafruit_NeoPixel",
|
||||
},
|
||||
{
|
||||
version: "todo",
|
||||
library: "TSL45xxx",
|
||||
library: "Adafruit SSD1306",
|
||||
link: "https://github.com/adafruit/Adafruit_SSD1306",
|
||||
},
|
||||
{
|
||||
version: "2.3.4",
|
||||
library: "teensy/td_libs_OneWire.html",
|
||||
library: "Adafruit GFX Library",
|
||||
link: "https://github.com/adafruit/Adafruit-GFX-Library",
|
||||
},
|
||||
{
|
||||
version: "1.0.0",
|
||||
library: "watterott/Arduino-Libs/tree/master/RV8523",
|
||||
library: "Adafruit MQTT Library",
|
||||
link: "https://github.com/adafruit/Adafruit_MQTT_Library",
|
||||
},
|
||||
{
|
||||
version: "1.0.0",
|
||||
library: "sensebox/SDS011-select-serial ",
|
||||
library: "Adafruit BusIO",
|
||||
link: "https://github.com/adafruit/Adafruit_BusIO",
|
||||
},
|
||||
{
|
||||
version: "1.0.0",
|
||||
library: "Lucas-Steinmann/SSD1306-Plot-Library",
|
||||
library: "Adafruit SleepyDog Library",
|
||||
link: "https://github.com/adafruit/Adafruit_SleepyDog",
|
||||
},
|
||||
{
|
||||
version: "1.0.0",
|
||||
library: "senseBoxIO",
|
||||
library: "DallasTemperature",
|
||||
link: "https://github.com/milesburton/Arduino-Temperature-Control-Library",
|
||||
},
|
||||
{
|
||||
library: "ArduinoBearSSL",
|
||||
link: "https://github.com/arduino-libraries/ArduinoBearSSL",
|
||||
},
|
||||
{
|
||||
library: "ArduinoECCX08",
|
||||
link: "https://github.com/arduino-libraries/ArduinoECCX08",
|
||||
},
|
||||
{
|
||||
library: "SparkFun SCD30 Arduino Library",
|
||||
link: "https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library",
|
||||
},
|
||||
{
|
||||
library: "SparkFun u-blox GNSS Arduino Library",
|
||||
link: "https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library",
|
||||
},
|
||||
{
|
||||
library: "NewPing",
|
||||
link: "https://bitbucket.org/teckel12/arduino-new-ping/wiki/Home",
|
||||
},
|
||||
{
|
||||
library: "IBM LMIC framework",
|
||||
link: "https://github.com/matthijskooijman/arduino-lmic",
|
||||
},
|
||||
{
|
||||
library: "LoRa Serialization",
|
||||
link: "https://github.com/thesolarnomad/lora-serialization",
|
||||
},
|
||||
{
|
||||
library: "CayenneLPP",
|
||||
link: "https://github.com/ElectronicCats/CayenneLPP",
|
||||
},
|
||||
{ library: "OneWire", link: "https://github.com/PaulStoffregen/OneWire" },
|
||||
{
|
||||
library: "Nova Fitness Sds dust sensors library",
|
||||
link: "https://github.com/lewapek/sds-dust-sensors-arduino-library",
|
||||
},
|
||||
{ library: "JC_Button", link: "https://github.com/JChristensen/JC_Button" },
|
||||
{ library: "SD", link: "https://github.com/arduino-libraries/SD" },
|
||||
{
|
||||
library: "BSEC Software Library",
|
||||
link: "https://github.com/BoschSensortec/BSEC-Arduino-library",
|
||||
},
|
||||
{
|
||||
library: "TheThingsNetwork",
|
||||
link: "https://github.com/TheThingsNetwork/arduino-device-lib",
|
||||
},
|
||||
{
|
||||
library: "NTPClient",
|
||||
link: "https://github.com/arduino-libraries/NTPClient",
|
||||
},
|
||||
{
|
||||
library: "phyphox BLE",
|
||||
link: "https://github.com/phyphox/phyphox-arduino",
|
||||
},
|
||||
];
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user