<commit_before>goog.provide('Blockly.Arduino.Robotdulab');
goog.require('Blockly.Arduino');


var setup_robotdulab = "robotDuLAB.begin();\n";

var define_robotdulab = '#include <Servo.h>\n'+
  '#include <Adafruit_NeoPixel.h>\n'+
  '#include <RobotDuLAB.h>\n'+
  '#define TRIGGER_PIN 2 // broche trig du capteur US HC-SR04\n'+
  '#define ECHO_PIN 4 // broche echo du capteur US HC-SR04\n'+
  '#define ROUE_DROITE_PIN 5\n'+
  '#define ROUE_GAUCHE_PIN 3\n'+
  '#define ANNEAU_LED_PIN 6\n\n'+
  'RobotDuLAB robotDuLAB(TRIGGER_PIN, ECHO_PIN, ROUE_DROITE_PIN, ROUE_GAUCHE_PIN, ANNEAU_LED_PIN);\n';

Blockly.Arduino ['Avancer'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.Avancer();\n";
  return  code;
};

Blockly.Arduino ['Reculer'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.Reculer()\n";
  return  code;
};

Blockly.Arduino ['Arreter'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.Arreter()\n";
  return  code;
};

Blockly.Arduino ['TournerAGauche'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.TournerAGauche()\n";
  return  code;
};

Blockly.Arduino ['TournerADroite'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.TournerADroite()\n";
  return  code;
};

Blockly.Arduino ['Attendre'] = function (block)  {
  var time = Blockly.Arduino.valueToCode(block, 'DELAY_TIME', Blockly.Arduino.ORDER_ATOMIC);
  var code  ="delay("+time+");\n";
  return  code;
};

Blockly.Arduino ['AnimerAnneauLed'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  
  var couleur = Blockly.Arduino.valueToCode(block, 'Couleur', Blockly.Arduino.ORDER_ATOMIC)||'VERT';
  var animation = Blockly.Arduino.valueToCode(block, 'Animation', Blockly.Arduino.ORDER_ATOMIC)||'COULEUR';

  var code  ="robotDuLAB.AnimerAnneauLed("+animation+","+couleur+");\n";
  return  code;
};

Blockly.Arduino ['Distance'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.getDistance()";
  return [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['Animation'] = function (block)  {
  var dropdown_option = block.getFieldValue('Animation');
  var value_option = Blockly.Arduino.valueToCode(block, 'Animation', Blockly.Arduino.ORDER_ATOMIC);
  var code  = dropdown_option;
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['VERT'] = function (block)  {
  var code  ="VERT";
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['ROUGE'] = function (block)  {
  var code  ="ROUGE";
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['MAGENTA'] = function (block)  {
  var code  ="MAGENTA";
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['BLEU'] = function (block)  {
  var code  ="BLEU";
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};
<commit_msg>ajout du point virgule à chaque instruction<commit_after>goog.provide('Blockly.Arduino.Robotdulab');
goog.require('Blockly.Arduino');


var setup_robotdulab = "robotDuLAB.begin();\n";

var define_robotdulab = '#include <Servo.h>\n'+
  '#include <Adafruit_NeoPixel.h>\n'+
  '#include <RobotDuLAB.h>\n'+
  '#define TRIGGER_PIN 2 // broche trig du capteur US HC-SR04\n'+
  '#define ECHO_PIN 4 // broche echo du capteur US HC-SR04\n'+
  '#define ROUE_DROITE_PIN 5\n'+
  '#define ROUE_GAUCHE_PIN 3\n'+
  '#define ANNEAU_LED_PIN 6\n\n'+
  'RobotDuLAB robotDuLAB(TRIGGER_PIN, ECHO_PIN, ROUE_DROITE_PIN, ROUE_GAUCHE_PIN, ANNEAU_LED_PIN);\n';

Blockly.Arduino ['Avancer'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.Avancer();\n";
  return  code;
};

Blockly.Arduino ['Reculer'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.Reculer();\n";
  return  code;
};

Blockly.Arduino ['Arreter'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.Arreter();\n";
  return  code;
};

Blockly.Arduino ['TournerAGauche'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.TournerAGauche();\n";
  return  code;
};

Blockly.Arduino ['TournerADroite'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.TournerADroite();\n";
  return  code;
};

Blockly.Arduino ['Attendre'] = function (block)  {
  var time = Blockly.Arduino.valueToCode(block, 'DELAY_TIME', Blockly.Arduino.ORDER_ATOMIC);
  var code  ="delay("+time+");\n";
  return  code;
};

Blockly.Arduino ['AnimerAnneauLed'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  
  var couleur = Blockly.Arduino.valueToCode(block, 'Couleur', Blockly.Arduino.ORDER_ATOMIC)||'VERT';
  var animation = Blockly.Arduino.valueToCode(block, 'Animation', Blockly.Arduino.ORDER_ATOMIC)||'COULEUR';

  var code  ="robotDuLAB.AnimerAnneauLed("+animation+","+couleur+");\n";
  return  code;
};

Blockly.Arduino ['Distance'] = function (block)  {
  Blockly.Arduino.setups_["setup_robotdulab"] = setup_robotdulab;
  Blockly.Arduino.definitions_["define_robotdulab"] = define_robotdulab;
  var code  ="robotDuLAB.getDistance();";
  return [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['Animation'] = function (block)  {
  var dropdown_option = block.getFieldValue('Animation');
  var value_option = Blockly.Arduino.valueToCode(block, 'Animation', Blockly.Arduino.ORDER_ATOMIC);
  var code  = dropdown_option;
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['VERT'] = function (block)  {
  var code  ="VERT";
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['ROUGE'] = function (block)  {
  var code  ="ROUGE";
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['MAGENTA'] = function (block)  {
  var code  ="MAGENTA";
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

Blockly.Arduino['BLEU'] = function (block)  {
  var code  ="BLEU";
  return  [ code,  Blockly.Arduino.ORDER_ATOMIC ];
};

{'fraction_non_alphanumeric': 0.1511516968788333, 'fraction_numerical': 0.0024533187951478806, 'mean_word_length': 5.3975588491717525, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3662833', 'n_tokens_mistral': 3048, 'n_tokens_neox': 2958, 'n_words': 436}