From aeedd8d895598fa63d7c7cbbf5d0f8620b87645f Mon Sep 17 00:00:00 2001 From: osk2 Date: Wed, 30 May 2018 11:23:50 +0800 Subject: [PATCH 1/7] Delete CNAME --- CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index c98a1d1..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -blockly.webduino.io From 402333e5eb56b3af22106846cb862d92a8f69cdd Mon Sep 17 00:00:00 2001 From: sheng Date: Tue, 10 Jul 2018 14:58:26 +0800 Subject: [PATCH 2/7] Add bitGPIO to support bit --- webduino-blockly.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webduino-blockly.js b/webduino-blockly.js index b64d66c..8db0de6 100644 --- a/webduino-blockly.js +++ b/webduino-blockly.js @@ -74,6 +74,11 @@ return board ? board.getPin(pinNum) : undef; } + function bitGPIO(pinNum) { + var pinMaps = [25, 32, 33, 13, 15, 35, 12, 14, 16, 17, 26, 27, 2, 18, 19, 23, 5]; + return pinMaps[pinNum]; + } + function searchBoard(options) { var keys = Object.keys(options), candidate, @@ -705,6 +710,7 @@ scope.boardReady = boardReady; scope.getPin = getPin; + scope.bitGPIO = bitGPIO; scope.getLed = getLed; scope.getRelay = getRelay; scope.getRGBLed = getRGBLed; From 2f60be8cfe6ad3c27556d6f77cee2e9936bfc113 Mon Sep 17 00:00:00 2001 From: sheng Date: Tue, 10 Jul 2018 15:02:04 +0800 Subject: [PATCH 3/7] Bumped version to 0.0.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e5ae9b..e4027b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webduino-blockly", - "version": "0.0.11", + "version": "0.0.12", "main": "index.js", "description": "The Visual Programming Editor for Webduino", "repository": "https://github.com/webduinoio/webduino-blockly.git", From c8f437a19c446006f6249381d36edf55df0fd42c Mon Sep 17 00:00:00 2001 From: osk2 Date: Fri, 17 Aug 2018 15:16:58 +0800 Subject: [PATCH 4/7] Update README.md --- README.md | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 576b1ed..3ad96cf 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,38 @@ # Webduino-Blockly -The Visual Programming Editor for [Webduino](http://webduino.io). +The Visual Programming Editor for Webduino. Google's [Blockly](https://github.com/google/blockly) is a web-based, visual programming editor. Users can drag blocks together to build programs. -## Installation +## Prerequisite + +- [Node.js](https://nodejs.org) and NPM +- [Bower](http://bower.io) -First, make sure [bower](http://bower.io) has been installed. +## Installation ```Shell -$ git clone https://github.com/webduinoio/webduino-blockly.git -$ cd webduino-blockly -$ bower install +git clone https://github.com/webduinoio/webduino-blockly.git +cd webduino-blockly +npm install +bower install ``` -Now, webduino-blockly has been successfully installed. Open your browser point it to **index.html**. +## Run + +``` +npm run start +``` + +Navigate to http://127.0.0.1:8080 and start hacking! ## Generated-Code Usage -#### Browser +You can use the code which generated by Webduino Blockly in your own application +Our APIs support both browser and Node.js, here's how you use it: + +#### In Browser ```html @@ -37,15 +50,16 @@ Now, webduino-blockly has been successfully installed. Open your browser point i ``` -#### Node.js +#### In Node.js Require the module first by: ```javascript require('webduino-blockly'); + +// ... The code generated by Webduino Blockly. ``` -Then paste-in the code generated by Blockly. ## License From f656474c6e4ba1fc12fda217280714c3ca044bbe Mon Sep 17 00:00:00 2001 From: Rick Date: Mon, 1 Oct 2018 09:48:42 +0800 Subject: [PATCH 5/7] fix math_round_digit block exchange floor and ceil --- blocks/webduino.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/webduino.js b/blocks/webduino.js index 8b85aea..40db763 100644 --- a/blocks/webduino.js +++ b/blocks/webduino.js @@ -827,8 +827,8 @@ Blockly.Blocks['math_round_digit'] = { this.appendValueInput("round_") .appendField(new Blockly.FieldDropdown([ [Blockly.Msg.WEBDUINO_MATH_ROUND, "round"], - [Blockly.Msg.WEBDUINO_MATH_ROUND_UP, "floor"], - [Blockly.Msg.WEBDUINO_MATH_ROUND_DOWN, "ceil"] + [Blockly.Msg.WEBDUINO_MATH_ROUND_UP, "ceil"], + [Blockly.Msg.WEBDUINO_MATH_ROUND_DOWN, "floor"] ]), "type_") .appendField(Blockly.Msg.WEBDUINO_MATH_ROUND_TO, "到小數點") .appendField(new Blockly.FieldDropdown([ From e6ddc5fad8038181331a9e90557d0c7bd7734b50 Mon Sep 17 00:00:00 2001 From: GoGoPenguin Date: Mon, 22 Nov 2021 13:10:30 +0800 Subject: [PATCH 6/7] chore: :memo: update readme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3ad96cf..75acc3a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +# Archive + +New repo is: + # Webduino-Blockly The Visual Programming Editor for Webduino. @@ -24,7 +28,7 @@ bower install npm run start ``` -Navigate to http://127.0.0.1:8080 and start hacking! +Navigate to and start hacking! ## Generated-Code Usage @@ -60,7 +64,6 @@ require('webduino-blockly'); // ... The code generated by Webduino Blockly. ``` - ## License Webduino-Blockly is released under the MIT License. From 139eb3890d13cf22e70d1792b2b4d414a41b1499 Mon Sep 17 00:00:00 2001 From: GoGoPenguin <34542533+GoGoPenguin@users.noreply.github.com> Date: Mon, 22 Nov 2021 13:34:11 +0800 Subject: [PATCH 7/7] Update README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 75acc3a..8471708 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ -# Archive - -New repo is: - # Webduino-Blockly The Visual Programming Editor for Webduino.