Package com.ardublock.translator.block

Examples of com.ardublock.translator.block.TranslatorBlock


  //@Override
    public String toCode() throws SocketNullException, SubroutineNotDeclaredException
    {
      String line_number;
      String brightness;
      TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(1);
      line_number = translatorBlock.toCode();
      translatorBlock = this.getRequiredTranslatorBlockAtSocket(2);
      brightness = translatorBlock.toCode();
     
      translator.addHeaderFile("Wire.h");
      translator.addHeaderFile("SeeedOLED.h");
      translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/");
      translator.addSetupCommand("SeeedOled.brancher();\nSeeedOled.reglerLuminositeA("+ brightness +");\n ");
     
     
      TranslatorBlock translatorBlock2 = this.getRequiredTranslatorBlockAtSocket(0, "SeeedOled.ecrire(", " );\n");
     
      String ret = "SeeedOled.placerCurseurEn("+ line_number +");\n" +  translatorBlock2.toCode() ;
     
      return ret ; 
    }
View Full Code Here


 
  //@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(0);
      Pin = translatorBlock.toCode();
     
      translator.addHeaderFile("VirtualWire.h");
      translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/");
      translator.addSetupCommand("brancherRecepteur("+ Pin +");");
      return codePrefix +"\"recevoirTexte()\"" + codeSuffix; 
View Full Code Here

  public String toCode() throws SocketNullException, SubroutineNotDeclaredException
  {
    String Clk;
    String Dio;
    String Niveau;
    TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0);
    Dio = translatorBlock.toCode();
    translatorBlock = this.getRequiredTranslatorBlockAtSocket(1);
    Clk = translatorBlock.toCode();
    translatorBlock = this.getRequiredTranslatorBlockAtSocket(2);
    Niveau = translatorBlock.toCode();
   
   
    translator.addHeaderFile("LED_Bar.h");
   
   
View Full Code Here

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

   
    translator.addHeaderFile("Ultrasonic.h");
    translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/\nUltrasonic monUltrasonic_pin"+Pin+"("+Pin +");"  );
   
View Full Code Here

 
  //@Override
    public String toCode() throws SocketNullException, SubroutineNotDeclaredException
    {
      String line_number;
      TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(1);
      line_number = translatorBlock.toCode();
     
      translator.addHeaderFile("Wire.h");
      translator.addHeaderFile("rgb_lcd.h");
      translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/\nrgb_lcd monRgb;");
      translator.addSetupCommand("monRgb.branch();");
     
     
      TranslatorBlock translatorBlock2 = this.getRequiredTranslatorBlockAtSocket(0, "monRgb.ecrire(", " );\n");
     
      String ret =  "monRgb.placerCurseurEn("+ line_number +");\n" + translatorBlock2.toCode() ;
     
      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("monDHTPRO_Humi_pin"+Pin+".begin();");
    translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/\nDHT monDHTPRO_Humi_pin"+Pin+"("+Pin +",DHT22);"  );
View Full Code Here

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

    translator.addHeaderFile("IRremote.h");
    translator.addDefinitionCommand("//libraries at http://www.duinoedu.com/\nIRrecv monRecepteur_pin"+Pin+"("+Pin +");"  );
    translator.addSetupCommand("monRecepteur_pin"+Pin+".enableIRIn(); ");
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 monDHT_Temp_pin"+Pin+"("+Pin +");"  );
View Full Code Here

  //@Override
  public String toCode() throws SocketNullException, SubroutineNotDeclaredException
  {
    // r�cup�ration des param�tres du module, ici le message plac� en rang 0
    // on �crit donc le code �  g�n�rer
    TranslatorBlock translatorBlock = this.getRequiredTranslatorBlockAtSocket(0, "lcd.print( ", " );\n");
    // cr�ation du texte de code correspondant
    translator.addHeaderFile("LiquidCrystal.h");
    translator.addDefinitionCommand("LiquidCrystal lcd(12, 11, 5, 4, 3, 2);");
    translator.addSetupCommand("lcd.begin(16, 2);");
    String ret = translatorBlock.toCode();
    return ret;
  }
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.