Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
1856f765
Commit
1856f765
authored
Feb 21, 2016
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor updates to block wording.
parent
e2f462f6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
blockly/blocks/arduino/io.js
blockly/blocks/arduino/io.js
+1
-1
blockly/blocks/arduino/procedures.js
blockly/blocks/arduino/procedures.js
+1
-1
blockly/blocks/arduino/servo.js
blockly/blocks/arduino/servo.js
+2
-2
blockly/generators/arduino/io.js
blockly/generators/arduino/io.js
+2
-2
blockly/generators/arduino/serial.js
blockly/generators/arduino/serial.js
+0
-1
No files found.
blockly/blocks/arduino/io.js
View file @
1856f765
...
@@ -37,7 +37,7 @@ Blockly.Blocks['io_digitalwrite'] = {
...
@@ -37,7 +37,7 @@ Blockly.Blocks['io_digitalwrite'] = {
this
.
setInputsInline
(
false
);
this
.
setInputsInline
(
false
);
this
.
setPreviousStatement
(
true
,
null
);
this
.
setPreviousStatement
(
true
,
null
);
this
.
setNextStatement
(
true
,
null
);
this
.
setNextStatement
(
true
,
null
);
this
.
setTooltip
(
'
Write digital value to a specific
Port
.
'
);
this
.
setTooltip
(
'
Write digital value to a specific
pin
.
'
);
},
},
/**
/**
* Updates the content of the the pin related fields.
* Updates the content of the the pin related fields.
...
...
blockly/blocks/arduino/procedures.js
View file @
1856f765
...
@@ -23,7 +23,7 @@ Blockly.Blocks['arduino_functions'] = {
...
@@ -23,7 +23,7 @@ Blockly.Blocks['arduino_functions'] = {
*/
*/
init
:
function
()
{
init
:
function
()
{
this
.
appendDummyInput
()
this
.
appendDummyInput
()
.
appendField
(
'
Arduino run
once
:
'
);
.
appendField
(
'
Arduino run
first
:
'
);
this
.
appendStatementInput
(
'
SETUP_FUNC
'
);
this
.
appendStatementInput
(
'
SETUP_FUNC
'
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
.
appendField
(
'
Arduino loop forever:
'
);
.
appendField
(
'
Arduino loop forever:
'
);
...
...
blockly/blocks/arduino/servo.js
View file @
1856f765
...
@@ -30,7 +30,7 @@ Blockly.Blocks['servo_write'] = {
...
@@ -30,7 +30,7 @@ Blockly.Blocks['servo_write'] = {
this
.
setHelpUrl
(
'
http://arduino.cc/en/Reference/ServoWrite
'
);
this
.
setHelpUrl
(
'
http://arduino.cc/en/Reference/ServoWrite
'
);
this
.
setColour
(
Blockly
.
Blocks
.
servo
.
HUE
);
this
.
setColour
(
Blockly
.
Blocks
.
servo
.
HUE
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
.
appendField
(
'
S
et SERVO from Pin
'
)
.
appendField
(
'
s
et SERVO from Pin
'
)
.
appendField
(
new
Blockly
.
FieldDropdown
(
.
appendField
(
new
Blockly
.
FieldDropdown
(
Blockly
.
Arduino
.
Boards
.
selected
.
pwmPins
),
'
SERVO_PIN
'
);
Blockly
.
Arduino
.
Boards
.
selected
.
pwmPins
),
'
SERVO_PIN
'
);
this
.
setInputsInline
(
false
);
this
.
setInputsInline
(
false
);
...
@@ -63,7 +63,7 @@ Blockly.Blocks['servo_read'] = {
...
@@ -63,7 +63,7 @@ Blockly.Blocks['servo_read'] = {
this
.
setHelpUrl
(
'
http://arduino.cc/en/Reference/ServoRead
'
);
this
.
setHelpUrl
(
'
http://arduino.cc/en/Reference/ServoRead
'
);
this
.
setColour
(
Blockly
.
Blocks
.
servo
.
HUE
);
this
.
setColour
(
Blockly
.
Blocks
.
servo
.
HUE
);
this
.
appendDummyInput
()
this
.
appendDummyInput
()
.
appendField
(
'
R
ead SERVO from PIN#
'
)
.
appendField
(
'
r
ead SERVO from PIN#
'
)
.
appendField
(
new
Blockly
.
FieldDropdown
(
.
appendField
(
new
Blockly
.
FieldDropdown
(
Blockly
.
Arduino
.
Boards
.
selected
.
pwmPins
),
'
SERVO_PIN
'
);
Blockly
.
Arduino
.
Boards
.
selected
.
pwmPins
),
'
SERVO_PIN
'
);
this
.
setOutput
(
true
,
Blockly
.
Types
.
NUMBER
.
basicType
);
this
.
setOutput
(
true
,
Blockly
.
Types
.
NUMBER
.
basicType
);
...
...
blockly/generators/arduino/io.js
View file @
1856f765
...
@@ -24,7 +24,7 @@ goog.require('Blockly.Arduino');
...
@@ -24,7 +24,7 @@ goog.require('Blockly.Arduino');
Blockly
.
Arduino
[
'
io_digitalwrite
'
]
=
function
(
block
)
{
Blockly
.
Arduino
[
'
io_digitalwrite
'
]
=
function
(
block
)
{
var
pin
=
block
.
getFieldValue
(
'
PIN
'
);
var
pin
=
block
.
getFieldValue
(
'
PIN
'
);
var
stateOutput
=
Blockly
.
Arduino
.
valueToCode
(
var
stateOutput
=
Blockly
.
Arduino
.
valueToCode
(
block
,
'
STATE
'
,
Blockly
.
Arduino
.
ORDER_ATOMIC
)
||
'
0
'
;
block
,
'
STATE
'
,
Blockly
.
Arduino
.
ORDER_ATOMIC
)
||
'
LOW
'
;
Blockly
.
Arduino
.
reservePin
(
Blockly
.
Arduino
.
reservePin
(
block
,
pin
,
Blockly
.
Arduino
.
PinTypes
.
OUTPUT
,
'
Digital Write
'
);
block
,
pin
,
Blockly
.
Arduino
.
PinTypes
.
OUTPUT
,
'
Digital Write
'
);
...
@@ -65,7 +65,7 @@ Blockly.Arduino['io_digitalread'] = function(block) {
...
@@ -65,7 +65,7 @@ Blockly.Arduino['io_digitalread'] = function(block) {
Blockly
.
Arduino
[
'
io_builtin_led
'
]
=
function
(
block
)
{
Blockly
.
Arduino
[
'
io_builtin_led
'
]
=
function
(
block
)
{
var
pin
=
block
.
getFieldValue
(
'
BUILT_IN_LED
'
);
var
pin
=
block
.
getFieldValue
(
'
BUILT_IN_LED
'
);
var
stateOutput
=
Blockly
.
Arduino
.
valueToCode
(
var
stateOutput
=
Blockly
.
Arduino
.
valueToCode
(
block
,
'
STATE
'
,
Blockly
.
Arduino
.
ORDER_ATOMIC
)
||
'
0
'
;
block
,
'
STATE
'
,
Blockly
.
Arduino
.
ORDER_ATOMIC
)
||
'
LOW
'
;
Blockly
.
Arduino
.
reservePin
(
Blockly
.
Arduino
.
reservePin
(
block
,
pin
,
Blockly
.
Arduino
.
PinTypes
.
OUTPUT
,
'
Set LED
'
);
block
,
pin
,
Blockly
.
Arduino
.
PinTypes
.
OUTPUT
,
'
Set LED
'
);
...
...
blockly/generators/arduino/serial.js
View file @
1856f765
...
@@ -40,7 +40,6 @@ Blockly.Arduino['serial_print'] = function(block) {
...
@@ -40,7 +40,6 @@ Blockly.Arduino['serial_print'] = function(block) {
}
else
{
}
else
{
var
code
=
serialId
+
'
.print(
'
+
content
+
'
);
\n
'
;
var
code
=
serialId
+
'
.print(
'
+
content
+
'
);
\n
'
;
}
}
return
code
;
return
code
;
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment