Commit 1856f765 authored by carlosperate's avatar carlosperate

Minor updates to block wording.

parent e2f462f6
...@@ -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.
......
...@@ -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:');
......
...@@ -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('Set SERVO from Pin') .appendField('set 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('Read SERVO from PIN#') .appendField('read 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);
......
...@@ -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');
......
...@@ -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;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment