Skip to content

Commit

Permalink
fixed typo, speed and size parameters and mouth list
Browse files Browse the repository at this point in the history
  • Loading branch information
cparrapa committed Oct 2, 2019
1 parent 1580f9a commit 9315e62
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions generators/arduino/otto.js
Expand Up @@ -126,8 +126,8 @@ Blockly.Arduino['otto9_gesture'] = function(block) {
+ '#define PIN_Trigger 8 // ultrasound \n'
+ '#define PIN_Echo 9 // ultrasound \n'
+ '#define PIN_Buzzer 13 //buzzer';
Blockly.Arduino.definitions_['otto9_distance'] = '#define PIN_Trigger 8\n'
+ '#define PIN_Echo 9';
Blockly.Arduino.definitions_['otto9_distance'] = '#define PIN_Trigger 8 // ultrasound \n'
+ '#define PIN_Echo 9 // ultrasound';
Blockly.Arduino.setups_['otto9_init']='Otto.init(PIN_YL, PIN_YR, PIN_RL, PIN_RR, true, A6, PIN_Buzzer, PIN_Trigger, PIN_Echo);\n';
var code = 'Otto.playGesture(' + dropdown_otto_gesture + ');\n';
return code;
Expand All @@ -149,8 +149,8 @@ Blockly.Arduino['otto9_getdistance'] = function(block) {
Blockly.Arduino.includes_['otto9_lib_dist'] = '#include <US.h>';
Blockly.Arduino.variables_['otto9_distance'] = 'int distance;\n'
+ 'bool obstacleDetected = false;';
Blockly.Arduino.definitions_['otto9_distance'] = '#define PIN_Trigger 8\n'
+ '#define PIN_Echo 9';
Blockly.Arduino.definitions_['otto9_distance'] = '#define PIN_Trigger 8 // ultrasound \n'
+ '#define PIN_Echo 9 // ultrasound';
Blockly.Arduino.setups_['otto9_init']='Otto.init(PIN_YL, PIN_YR, PIN_RL, PIN_RR, true, A6, PIN_Buzzer, PIN_Trigger, PIN_Echo);\n';
var code = 'Otto.getDistance()';
return [code, Blockly.Arduino.ORDER_ATOMIC];
Expand All @@ -172,13 +172,13 @@ Blockly.Arduino['otto9_touchbutton'] = function(block) {
Blockly.Arduino.variables_['otto9_touchbutton'] = 'volatile bool buttonPushed = false;';
Blockly.Arduino.definitions_['otto9_sound'] = '#define PIN_Button A0';
Blockly.Arduino.setups_['otto9_init']='pinMode(PIN_Button, INPUT);\n';
var code = 'digital.Read(PIN_Button)';
var code = 'digitalRead(PIN_Button)';
return [code, Blockly.Arduino.ORDER_ATOMIC];
};

Blockly.Arduino['otto9_mouth'] = function(block) {
var dropdown_otto9_mouth_choice = block.getFieldValue('otto9_mouth_choice');
Blockly.Arduino.includes_['otto9_lib'] = '#include <Otto9.h>'
Blockly.Arduino.includes_['otto9_lib'] = '#include <Otto9.h>\n'
+ 'Otto9 Otto;';
Blockly.Arduino.variables_['otto9_matrix'] = 'unsigned long int matrix;';
Blockly.Arduino.definitions_['otto9_matrix_def'] = '#define DIN_PIN A3\n'
Expand Down
2 changes: 1 addition & 1 deletion index_electron.html
Expand Up @@ -413,7 +413,7 @@ <h4>
<br /> - Alan YORINKS - PyMata-aio : (<a href='http://mryslab.blogspot.fr' target='blank'>http://mryslab.blogspot.fr</a>)
<br /> - Tom NEUTENS - IDE java plugin : (<a href='https://github.com/dwengovzw/Blockly-for-Dwenguino' target='blank'>https://github.com/dwengovzw/Blockly-for-Dwenguino</a>)
<br /> - JP FONTAINE - Electron version : (<a href='http://lesormeaux.net/blockly-arduino/start.html' target='blank'>http://lesormeaux.net/blockly-arduino/start.html</a>)
<br /> - Camilo PARRA PALACIO - UI design : (<a href='https://www.ottodiy.com/' target='blank'>https://www.ottodiy.com/</a>)
<br /> - Camilo Parra Palacio - UI design : (<a href='https://www.ottodiy.com/' target='blank'>https://www.ottodiy.com/</a>)
<br /> - Leroyd LAFFINEUR - icons design : (<a href='http://idehack.com' target='blank'>http://idehack.com</a>)
<br /> - Bootstrap (<a href='http://getbootstrap.com' target='blank'>http://getbootstrap.com</a>)
<br /> - Font Awesome Icons (<a href='http://fontawesome.io' target='blank'>http://fontawesome.io</a>)
Expand Down
8 changes: 4 additions & 4 deletions lang/BlocklyArduino_blocks/en.js
Expand Up @@ -2387,13 +2387,13 @@ Blockly.Msg.OTTO9_HOME_URL = "https://www.ottodiy.com/";
Blockly.Msg.OTTO9_MOVE_TEXT = "move";
Blockly.Msg.OTTO9_MOVE_CHOICE = [["forward", "FORWARD"], ["backward", "BACKWARD"], ["turn left", "LEFT"], ["turn right", "RIGHT"], ["bend to the left", "BENDLEFT"], ["bend to the right", "BENDRIGHT"], ["shake left leg", "SHAKELEFT"], ["shake right leg", "SHAKERIGHT"]];
Blockly.Msg.OTTO9_MOVE_SPEED_TEXT = "speed";
Blockly.Msg.OTTO9_MOVE_SPEED_CHOICE = [["slow", "600"], ["normal", "800"], ["fast", "1000"], ["very fast", "1200"], ["luminic", "1400"]];
Blockly.Msg.OTTO9_MOVE_SPEED_CHOICE = [["slow", "2000"], ["normal", "1000"], ["fast", "750"], ["very fast", "500"], ["luminic", "250"]];
Blockly.Msg.OTTO9_DANCE_TEXT = "dance";
Blockly.Msg.OTTO9_DANCE_CHOICE = [["moonwalker", "moonwalker"], ["crusaito", "crusaito"], ["flapping", "flapping"], ["swing", "swing"], ["updown", "updown"], ["tiptoeSwing", "tiptoeSwing"], ["jitter", "jitter"], ["ascendingTurn", "ascendingTurn"]];
Blockly.Msg.OTTO9_DANCE_SPEED_TEXT = "speed";
Blockly.Msg.OTTO9_DANCE_SPEED_CHOICE = [["slow", "600"], ["normal", "800"], ["fast", "1000"], ["very fast", "1200"], ["luminic", "1400"]];
Blockly.Msg.OTTO9_DANCE_SPEED_CHOICE = [["slow", "2000"], ["normal", "1000"], ["fast", "750"], ["very fast", "500"], ["luminic", "250"]];
Blockly.Msg.OTTO9_DANCE_SIZE_TEXT = "size";
Blockly.Msg.OTTO9_DANCE_SIZE_CHOICE = [["normal", "15"], ["little", "5"], ["big", "30"]];
Blockly.Msg.OTTO9_DANCE_SIZE_CHOICE = [["normal", "20"], ["little", "5"], ["big", "40"]];
Blockly.Msg.OTTO9_GESTURE_TEXT = "gesture";
Blockly.Msg.OTTO9_GESTURE_CHOICE = [["happy", "OttoHappy"], ["super happy", "OttoSuperHappy"], ["sad", "OttoSad"], ["sleeping", "OttoSleeping"], ["fart", "OttoFart"], ["confused", "OttoConfused"], ["fretful", "OttoFretful"], ["love", "OttoLove"], ["angry", "OttoAngry"], ["magic", "OttoMagic"], ["wave", "OttoWave"], ["victory", "OttoVictory"], ["fail", "OttoFail"]];
Blockly.Msg.OTTO9_SOUND_TEXT = "sound";
Expand All @@ -2402,7 +2402,7 @@ Blockly.Msg.OTTO9_GETDISTANCE_TEXT = "distance";
Blockly.Msg.OTTO9_GETNOISE_TEXT = "noise";
Blockly.Msg.OTTO9_GETTOUCH_TEXT = "touch";
Blockly.Msg.OTTO9_MOUTH_TEXT = "mouth";
Blockly.Msg.OTTO9_MOUTH_CHOICE = [["happy", "happyOpen"], ["smile", "smile"], ["heart", "heart"], ["small surprise", "smallSurprise"], ["big surprise", "bigSurprise"], ["confused", "confused"], ["zero", "zero"], ["one", "one"], ["two", "two"], ["three", "three"], ["four", "four"], ["x", "xMouth"], ["ok", "okMouth"], ["thunder", "thunder"], ["line", "lineMouth"], ["little Uuh", "littleUuh, i"], ["dreamMouth0", "dreamMouth, 0"], ["dreamMouth1", "dreamMouth, 1"], ["dreamMouth2", "dreamMouth, 2"]];
Blockly.Msg.OTTO9_MOUTH_CHOICE = [["happyOpen", "happyOpen"],["happyClosed", "happyClosed"],["sadOpen", "23"], ["sadClosed", "24"],["vampire1", "vamp1"], ["vampire2", "vamp2"], ["smile", "smile"], ["heart", "heart"], ["small surprise", "smallSurprise"], ["big surprise", "bigSurprise"], ["confused", "confused"], ["0", "zero"], ["1", "one"], ["2", "two"], ["3", "three"], ["4", "four"],["5", "five"],["6", "six"],["7", "seven"],["8", "eight"],["9", "nine"], ["x", "xMouth"], ["ok", "okMouth"],["interrogation", "27"],["tongue", "tongueOut"],["culito", "culito"], ["thunder", "thunder"], ["line", "lineMouth"], ["diagonal", "21"], ["little Uuh", "littleUuh, i"], ["dreamMouth0", "dreamMouth, 0"], ["dreamMouth1", "dreamMouth, 1"], ["dreamMouth2", "dreamMouth, 2"]];
Blockly.Msg.OTTO9_MATRIX_TEXT = "matrix";
Blockly.Msg.OTTO9_MATRIXTEXT_TEXT = "matrix text";
Blockly.Msg.OTTO9_ARMS_TEXT = "arms";
Expand Down

0 comments on commit 9315e62

Please sign in to comment.