Package com.ardublock.translator.block

Examples of com.ardublock.translator.block.TranslatorBlock


 
  //@Override
    public String toCode() throws SocketNullException, SubroutineNotDeclaredException
    {
      String way;
      TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
      way = translatorBlock.toCode();
     
     
      translator.addHeaderFile("Wire.h");
      translator.addHeaderFile("MotorI2C.h");
      translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/\nMotorI2C mesMoteurs;");
View Full Code Here


  //@Override
    public String toCode() throws SocketNullException, SubroutineNotDeclaredException
    {
     
      String Pin;
      TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(1);
      Pin = translatorBlock.toCode();
     
      translator.addHeaderFile("VirtualWire.h");
      translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/");
      translator.addSetupCommand("brancherEmetteur("+ Pin +");");
     
     
      TranslatorBlock translatorBlock2 = this.getRequiredTranslatorBlockAtSocket(0, "emettreTexte(", ");\n");
     
      String ret =  translatorBlock2.toCode() ;
     
      return ret ; 
    }
View Full Code Here

    public String toCode() throws SocketNullException, SubroutineNotDeclaredException
    {
      String Clk;
      String Dio;
      String Brightness;
      TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
      Clk = translatorBlock.toCode();
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(1);
      Dio = translatorBlock.toCode();
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(2);
      Brightness = translatorBlock.toCode();
     
      translator.addHeaderFile("TM1637.h");
      translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/ \n// Pin Led Bar\n"
          + "TM1637 mesChiffres(" + Clk
          + "," + Dio + ");");
View Full Code Here

  }
  @Override
  public String toCode() throws SocketNullException, SubroutineNotDeclaredException
  {
    String Pwd;
    TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
    Pwd = translatorBlock.toCode();

    translator.addSetupCommand("keypad.writePassword(\""+ Pwd +"\");");
    String ret = "keypad.testPasswordOk()";
    return codePrefix + ret + codeSuffix;
  }
View Full Code Here

      String On_Digit1;
      String On_Digit2;
      String On_Digit3;
      String On_Digit4;
      String isMatch;
      TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
      On_Digit1 = translatorBlock.toCode();
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(1);
      On_Digit2 = translatorBlock.toCode();
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(2);
      On_Digit3 = translatorBlock.toCode();
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(3);
      On_Digit4 = translatorBlock.toCode();
      
      String ret;
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(4);
      isMatch=translatorBlock.toCode();
     
     
         ret =  "mesChiffres.afficherSur1("+ On_Digit1 + ");\n"+
            "mesChiffres.afficherSur2("+ On_Digit2 + ");\n"+
            "mesChiffres.afficherSur3("+ On_Digit3 + ");\n"+
View Full Code Here

    public String toCode() throws SocketNullException, SubroutineNotDeclaredException
  {

    String StartPin;
    String Diplay;
    TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
    StartPin = translatorBlock.toCode();
    String EndPin;
    TranslatorBlock translatorBlock2 = this.getRequiredTranslatorBlockAtSocket(1);
    EndPin = translatorBlock2.toCode();
    translatorBlock = this.getRequiredTranslatorBlockAtSocket(2);
    Diplay = translatorBlock.toCode();

    translator.addHeaderFile("Keypad.h");
    translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/\nKeypad keypad;"  );
View Full Code Here

  }
  @Override
  public String toCode() throws SocketNullException, SubroutineNotDeclaredException
  {
    String Pin;
    TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
    Pin = translatorBlock.toCode();

   
    translator.addHeaderFile("DHT.h");
   
    translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/ \nDHT monDHTPRO_Temp_pin"+Pin+"("+Pin +",DHT22);"  );
View Full Code Here

    public String toCode() throws SocketNullException, SubroutineNotDeclaredException
    {
      String Display;
      String On_Digit;
      String isMatch;
      TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
      Display = translatorBlock.toCode();
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(1);
      On_Digit = translatorBlock.toCode();
      
      String ret;
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(2);
      isMatch=translatorBlock.toCode();
     
     
         ret =  "mesChiffres.afficherSur" + On_Digit + "("+ Display + ");\n"+
            "mesChiffres.point("+isMatch+");";
   
View Full Code Here

    public String toCode() throws SocketNullException, SubroutineNotDeclaredException
    {
      String R;
      String G;
      String B;
      TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
      R = translatorBlock.toCode();
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(1);
      G = translatorBlock.toCode();
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(2);
      B = translatorBlock.toCode();
     
     
      String ret =  "monRgb.retroeclairage(" + R + ","+ G + "," + B + ");" ;
     
      return ret ; 
View Full Code Here

  }
  @Override
  public String toCode() throws SocketNullException, SubroutineNotDeclaredException
  {
    String Pin;
    TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
    Pin = translatorBlock.toCode();

   
    translator.addHeaderFile("DHT.h");
    translator.addSetupCommand("monDHT_Humi_pin"+Pin+".begin();");
    translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/\nDHT monDHT_Humi_pin"+Pin+"("+Pin +");"  );
View Full Code Here

TOP

Related Classes of com.ardublock.translator.block.TranslatorBlock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.