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-debug.log* | ||||||
| yarn-error.log* | yarn-error.log* | ||||||
| package-lock.json | package-lock.json | ||||||
| package-lock.json | 
 | ||||||
|  | |||||||
| @ -288,4 +288,17 @@ export const UI = { | |||||||
|   drawer_ideerror_head: "Hoppla da ist was schief gegangen.", |   drawer_ideerror_head: "Hoppla da ist was schief gegangen.", | ||||||
|   drawer_ideerror_text: |   drawer_ideerror_text: | ||||||
|     "Beim kompilieren ist ein Fehler aufgetreten, überprüfe deine Blöcke.", |     "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_head: "Oops something went wrong", | ||||||
|   drawer_ideerror_text: "An error occurred while compiling, check your blocks", |   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", | ||||||
| }; | }; | ||||||
|  | |||||||
| @ -208,7 +208,7 @@ void loop() { | |||||||
|             color="primary" |             color="primary" | ||||||
|             onClick={() => saveIno()} |             onClick={() => saveIno()} | ||||||
|           > |           > | ||||||
|             Save Code |             {Blockly.Msg.codeeditor_save_code} | ||||||
|           </Button> |           </Button> | ||||||
|           <Button |           <Button | ||||||
|             style={{ padding: "1rem", margin: "1rem" }} |             style={{ padding: "1rem", margin: "1rem" }} | ||||||
| @ -216,7 +216,7 @@ void loop() { | |||||||
|             color="primary" |             color="primary" | ||||||
|             onClick={() => openIno()} |             onClick={() => openIno()} | ||||||
|           > |           > | ||||||
|             Open Code |             {Blockly.Msg.codeeditor_open_code} | ||||||
|           </Button> |           </Button> | ||||||
|           <Button |           <Button | ||||||
|             style={{ padding: "1rem", margin: "1rem" }} |             style={{ padding: "1rem", margin: "1rem" }} | ||||||
| @ -224,7 +224,7 @@ void loop() { | |||||||
|             color="primary" |             color="primary" | ||||||
|             onClick={() => setResetDialog(true)} |             onClick={() => setResetDialog(true)} | ||||||
|           > |           > | ||||||
|             Reset Editor |             {Blockly.Msg.codeeditor_reset_code} | ||||||
|           </Button> |           </Button> | ||||||
|           <Button |           <Button | ||||||
|             style={{ padding: "1rem", margin: "1rem" }} |             style={{ padding: "1rem", margin: "1rem" }} | ||||||
| @ -232,7 +232,7 @@ void loop() { | |||||||
|             color="primary" |             color="primary" | ||||||
|             onClick={() => getBlocklyCode()} |             onClick={() => getBlocklyCode()} | ||||||
|           > |           > | ||||||
|             getBlocklyCode |             {Blockly.Msg.codeeditor_blockly_code} | ||||||
|           </Button> |           </Button> | ||||||
|           <Sidebar /> |           <Sidebar /> | ||||||
|           <Dialog |           <Dialog | ||||||
| @ -243,10 +243,7 @@ void loop() { | |||||||
|             title={"Code wird kompiliert"} |             title={"Code wird kompiliert"} | ||||||
|             content={""} |             content={""} | ||||||
|           > |           > | ||||||
|             <div> |             <div>{Blockly.Msg.codeeditor_compile_progress}</div> | ||||||
|               Dein Code wird nun kompiliert und anschließend auf deinen Computer |  | ||||||
|               heruntergeladen |  | ||||||
|             </div> |  | ||||||
|           </Dialog>{" "} |           </Dialog>{" "} | ||||||
|           <Dialog |           <Dialog | ||||||
|             open={resetDialog} |             open={resetDialog} | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| import React, { useEffect } from "react"; | import React from "react"; | ||||||
| import Blockly from "blockly"; | import Blockly from "blockly"; | ||||||
| import { useSelector } from "react-redux"; | import { useSelector } from "react-redux"; | ||||||
| import Accordion from "@material-ui/core/Accordion"; | 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 AccordionDetails from "@material-ui/core/AccordionDetails"; | ||||||
| import Typography from "@material-ui/core/Typography"; | import Typography from "@material-ui/core/Typography"; | ||||||
| import { LibraryVersions } from "../../data/versions.js"; | import { LibraryVersions } from "../../data/versions.js"; | ||||||
| import { useMonaco } from "@monaco-editor/react"; | //import { useMonaco } from "@monaco-editor/react";
 | ||||||
| import { Button } from "@material-ui/core"; | //import { Button } from "@material-ui/core";
 | ||||||
| import Dialog from "../Dialog"; | import Dialog from "../Dialog"; | ||||||
| import SerialMonitor from "./SerialMonitor.js"; | import SerialMonitor from "./SerialMonitor.js"; | ||||||
| import axios from "axios"; | //import axios from "axios";
 | ||||||
| 
 | 
 | ||||||
| const Sidebar = () => { | const Sidebar = () => { | ||||||
|   const [alert, setAlert] = React.useState(false); |   const [alert, setAlert] = React.useState(false); | ||||||
|   const [examples, setExamples] = React.useState([]); |   //const [examples, setExamples] = React.useState([]);
 | ||||||
| 
 |  | ||||||
|   const user = useSelector((state) => state.auth.user); |   const user = useSelector((state) => state.auth.user); | ||||||
| 
 |   // useEffect(() => {
 | ||||||
|   const monaco = useMonaco(); |   //   axios
 | ||||||
|   const loadCode = (code) => { |   //     .get("https://coelho.opensensemap.org/items/blocklysamples")
 | ||||||
|     monaco.editor.getModels()[0].setValue(code); |   //     .then((res) => {
 | ||||||
|   }; |   //       setExamples(res.data.data);
 | ||||||
|  |   //     });
 | ||||||
|  |   // }, []);
 | ||||||
|  |   //const monaco = useMonaco();
 | ||||||
|  |   // const loadCode = (code) => {
 | ||||||
|  |   //   monaco.editor.getModels()[0].setValue(code);
 | ||||||
|  |   // };
 | ||||||
| 
 | 
 | ||||||
|   const toggleDialog = () => { |   const toggleDialog = () => { | ||||||
|     setAlert(false); |     setAlert(false); | ||||||
| @ -113,7 +118,7 @@ const Sidebar = () => { | |||||||
|           aria-controls="panel2a-content" |           aria-controls="panel2a-content" | ||||||
|           id="panel2a-header" |           id="panel2a-header" | ||||||
|         > |         > | ||||||
|           <Typography>Installierte Libraries</Typography> |           <Typography>{Blockly.Msg.codeeditor_libraries_head}</Typography> | ||||||
|         </AccordionSummary> |         </AccordionSummary> | ||||||
|         <AccordionDetails |         <AccordionDetails | ||||||
|           style={{ padding: 0, height: "60vH", backgroundColor: "white" }} |           style={{ padding: 0, height: "60vH", backgroundColor: "white" }} | ||||||
| @ -121,10 +126,7 @@ const Sidebar = () => { | |||||||
|           <Typography |           <Typography | ||||||
|             style={{ overflow: "auto", width: "100%", padding: "1rem" }} |             style={{ overflow: "auto", width: "100%", padding: "1rem" }} | ||||||
|           > |           > | ||||||
|             <p> |             <p>{Blockly.Msg.codeeditor_libraries_text}</p> | ||||||
|               For Dokumentation take a look at the installed libraries and their |  | ||||||
|               source |  | ||||||
|             </p> |  | ||||||
|             {LibraryVersions().map((object, i) => { |             {LibraryVersions().map((object, i) => { | ||||||
|               return ( |               return ( | ||||||
|                 <p> |                 <p> | ||||||
|  | |||||||
| @ -1,102 +1,151 @@ | |||||||
| export const LibraryVersions = () => { | export const LibraryVersions = () => { | ||||||
|   return [ |   return [ | ||||||
|     { |     { | ||||||
|       version: "1.4.2", |       library: "SSD1306 Plot Library", | ||||||
|       library: "sensebox/SenseBoxMCU-Lib", |       link: "https://github.com/sensebox/SSD1306-Plot-Library/", | ||||||
|       link: "https://github.com/sensebox/SenseBoxMCU-Lib", |  | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.0.12", |       library: "SDS011 Library", | ||||||
|       library: "sparkfun/SparkFun_SCD30_Arduino_Library", |       link: "https://github.com/sensebox/SDS011-select-serial/", | ||||||
|     }, |  | ||||||
|     { version: "1.2.3", library: "adafruit/Adafruit-GFX-Library" }, |  | ||||||
|     { |  | ||||||
|       version: "2.1.2", |  | ||||||
|       library: "adafruit/Adafruit_BME280_Library", |  | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "2.1.0", |       library: "RV8523 Arduino Library", | ||||||
|       library: "adafruit/Adafruit_BMP280_Library", |       link: "https://github.com/sensebox/RV8523-RTC-Arduino-Library", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.1.1", |       library: "BMX055_Library", | ||||||
|       library: "adafruit/Adafruit_BME680", |       link: "https://github.com/sensebox/BMX055-Arduino-Library/", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "2.0.1", |       library: "LTR329", | ||||||
|       library: "adafruit/Adafruit_BMP3XX", |       link: "https://github.com/sensebox/LTR329-Lightsensor-Arduino-Library/", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "2.0.0", |       library: "VEML6070", | ||||||
|       library: "adafruit/Adafruit_HDC1000_Library", |       link: "https://github.com/sensebox/VEML6070-UV-Arduino-Library/", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.7.1", |       library: "senseBox Web Library", | ||||||
|       library: "adafruit/Adafruit_BusIO", |       link: "https://github.com/sensebox/sensebox-libweb/", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.0.6", |       library: "Arduino WiFi101", | ||||||
|       library: "adafruit/Adafruit_NeoPixel", |       link: "https://github.com/arduino-libraries/WiFi101", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.1.2", |       library: "Ethernet", | ||||||
|       library: "adafruit/Adafruit_SSD1306", |       link: "https://github.com/arduino-libraries/Ethernet", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.0.2", |       library: "ArduinoJson", | ||||||
|       library: "adafruit/Adafruit_Sensor", |       link: "https://github.com/bblanchon/ArduinoJson", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "3.8.0", |       library: "Adafruit Sensor Library", | ||||||
|       library: "milesburton/Arduino-Temperature-Control-Library", |       link: "https://github.com/adafruit/Adafruit_Sensor", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.5.0", |       library: "Adafruit HDC1000 Library", | ||||||
|       library: "arduino-libraries/ArduinoBearSSL", |       link: "https://github.com/adafruit/Adafruit_HDC1000_Library", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.3.4", |       library: "Adafruit BME280 Library", | ||||||
|       library: "arduino-libraries/ArduinoECCX08", |       link: "https://github.com/adafruit/Adafruit_BME280_Library", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "2.0.0", |       library: "Adafruit BMP280 Library", | ||||||
|       library: "arduino-libraries/ArduinoECCX08", //todo
 |       link: "https://github.com/adafruit/Adafruit_BMP280_Library", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "0.7.1", |       library: "Adafruit BME680 Library", | ||||||
|       library: "cmaglie/FlashStorage", |       link: "https://github.com/adafruit/Adafruit_BME680", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.5.1", |       library: "Adafruit DPS310", | ||||||
|       library: "matthijskooijman/arduino-lmic", |       link: "https://github.com/adafruit/Adafruit_DPS310", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "3.0.1", |       library: "Adafruit NeoPixel", | ||||||
|       library: "thesolarnomad/lora-serialization ", |       link: "https://github.com/adafruit/Adafruit_NeoPixel", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "todo", |       library: "Adafruit SSD1306", | ||||||
|       library: "TSL45xxx", |       link: "https://github.com/adafruit/Adafruit_SSD1306", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "2.3.4", |       library: "Adafruit GFX Library", | ||||||
|       library: "teensy/td_libs_OneWire.html", |       link: "https://github.com/adafruit/Adafruit-GFX-Library", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.0.0", |       library: "Adafruit MQTT Library", | ||||||
|       library: "watterott/Arduino-Libs/tree/master/RV8523", |       link: "https://github.com/adafruit/Adafruit_MQTT_Library", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.0.0", |       library: "Adafruit BusIO", | ||||||
|       library: "sensebox/SDS011-select-serial ", |       link: "https://github.com/adafruit/Adafruit_BusIO", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.0.0", |       library: "Adafruit SleepyDog Library", | ||||||
|       library: "Lucas-Steinmann/SSD1306-Plot-Library", |       link: "https://github.com/adafruit/Adafruit_SleepyDog", | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|       version: "1.0.0", |       library: "DallasTemperature", | ||||||
|       library: "senseBoxIO", |       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