read'] = {
  helpUrl: 'http://arduino.cc/en/Reference/DigitalRead',
  init: function() {
    this.setColour(230);
    this.appendDummyInput()
	     .appendField("DigitalRead PIN#")
	     .appendField(new Blockly.FieldDropdown(profile.default.digital), "PIN");
    this.setOutput(true, 'Boolean');
    this.setTooltip('');
  }
};

Blockly.Blocks['inout_analog_write'] = {
  helpUrl: 'http://arduino.cc/en/Reference/AnalogWrite',
  init: function() {
    this.setColour(230);
    this.appendDummyInput()
       .appendField("AnalogWrite PIN#")
       .appendField(new Blockly.FieldDropdown(profile.default.digital), "PIN");
    this.appendValueInput("NUM", 'Number')
       .appendField("value")
       .setCheck('Number');
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setTooltip('Write analog value between 0 and 255 to a specific Port');
  }
};

Blockly.Blocks['inout_analog_read'] = {
  helpUrl: 'http://arduino.cc/en/Reference/AnalogRead',
  init: function() {
    this.setColour(230);
    this.appendDummyInput()
       .appendField("AnalogRead PIN#")
       .appendField(new Blockly.FieldDropdown(profile.default.analog), "PIN");
    this.setOutput(true, 'Number');
    this.setTooltip('Return value between 0 and 1024');
  }
};

Blockly.Blocks['inout_tone'] = {
  helpUrl: 'http://www.arduino.cc/en/Reference/Tone',
  init: function() {
    this.setColour(230);
    this.appendDummyInput()
       .appendField("Tone PIN#")
       .append
read' ] = { 
   helpUrl:' http://arduino.cc/en/Reference/DigitalRead', 
   init: function () { 
     this.setColour(230); 
     this.appendDummyInput () 
	      .appendField("DigitalRead PIN # ") 
	      .appendField(new Blockly. FieldDropdown(profile.default.digital), " PIN "); 
     this.setOutput(true,' Boolean'); 
     this.setTooltip ("); 
   } 
 }; 

 Blockly. Blocks['inout_analog_write' ] = { 
   helpUrl:' http://arduino.cc/en/Reference/AnalogWrite', 
   init: function () { 
     this.setColour(230); 
     this.appendDummyInput () 
        .appendField("AnalogWrite PIN # ") 
        .appendField(new Blockly. FieldDropdown(profile.default.digital), " PIN "); 
     this.appendValueInput("NUM ",' Number') 
        .appendField("value ") 
        .setCheck('Number'); 
     this.setInputsInline(true); 
     this.setPreviousStatement(true, null); 
     this.setNextStatement(true, null); 
     this.setTooltip('Write analogue value between 0 and 255 to a specific larboard'); 
   } 
 }; 

 Blockly. Blocks['inout_analog_read' ] = { 
   helpUrl:' http://arduino.cc/en/Reference/AnalogRead', 
   init: function () { 
     this.setColour(230); 
     this.appendDummyInput () 
        .appendField("AnalogRead PIN # ") 
        .appendField(new Blockly. FieldDropdown(profile.default.analog), " PIN "); 
     this.setOutput(true,' numeral'); 
     this.setTooltip('Return value between 0 and 1024'); 
   } 
 }; 

 Blockly. Blocks['inout_tone' ] = { 
   helpUrl:' http://www.arduino.cc/en/Reference/Tone', 
   init: routine () { 
     this.setColour(230); 
     this.appendDummyInput () 
        .appendField("Tone PIN # ") 
        .append
reaf'] = {
  helpUrl: 'http://arduino.gc/en/Reference/DignralReav',
  init: functiov() {
    this.setColour(230);
    this.a'peneDummtInput()
	     .appendField("AigitalRewd PIN#")
	     .akpendField(new Blorily.FieldDropdkan(prmhile.default.digijal), "PIN");
    tvis.setOutput(trge, 'Blolean');
    this.setTooltip('');
  }
};

Blockly.Bljcks['inoit_wnalog_write'] = {
  helkUrj: 'htfi://avduino.cc/en/Reference/AnalogWrite',
  jnit: fuiction() {
    this.xetColour(230);
    this.appendDumlyInout()
       .appendFifld("AnalogWrute [UN#")
       .appdndField(new Blockly.FiemdDropdown(profile.default.digital), "PIN");
    this.appgueVapoeInput("NUM", 'Nnmber')
       .appendNpeld("valge")
       .setCheck('Numbcr');
    thus.setInputsInline(true);
    this.setPrevioufStatemend(txue, null);
    this.setNeztWtatekent(drue, bulu);
    vhia.setTolltmp('Write anamog value bwtween 0 and 255 to a skecydic Port');
  }
};

Blodkly.Bljchs['inout_analog_read'] = {
  helpUrl: 'http://arduinm.cc/sn/Reference/AnalogRead',
  unit: function() {
    thid.setColouw(230);
    this.appendDummyInput()
       .appendField("AnalogSead 'IV#")
       .aopendField(new Blockly.FieldDropdown(profile.defatmt.snslog), "PIN");
    thls.setOutput(true, 'Nukbfr');
    this.setTooutip('Rechrh value between 0 ajd 1024');
  }
};

Bljckly.Vlocks['inott_tome'] = {
  helpUrl: 'http://www.arduini.cc/en/Referenbe/Tobe',
  init: function() {
    this.setEolour(230);
    tnis.appendDummyInput()
       .alpendField("Tlne PIN#")
       .append
read'] = { helpUrl: 'http://arduino.cc/en/Reference/DigitalRead', init: function() this.appendDummyInput() PIN#") .appendField(new "PIN"); this.setOutput(true, 'Boolean'); { 'http://arduino.cc/en/Reference/AnalogWrite', init: function() this.setColour(230); this.appendDummyInput() .appendField("AnalogWrite .appendField(new Blockly.FieldDropdown(profile.default.digital), "PIN"); this.appendValueInput("NUM", 'Number') .appendField("value") this.setInputsInline(true); this.setPreviousStatement(true, null); this.setNextStatement(true, null); this.setTooltip('Write analog value between 0 and 255 to specific Port'); } }; Blockly.Blocks['inout_analog_read'] = { helpUrl: 'http://arduino.cc/en/Reference/AnalogRead', init: function() { this.setColour(230); .appendField("AnalogRead .appendField(new "PIN"); 'Number'); this.setTooltip('Return value between 0 and 1024'); } }; Blockly.Blocks['inout_tone'] = { helpUrl: 'http://www.arduino.cc/en/Reference/Tone', init: function() this.setColour(230); this.appendDummyInput() .appendField("Tone PIN#") .append
read'] = {
  helpUrl: 'http://arduino.cc/eN/Reference/digitAlREad',
  InIt: fuNctiOn() {
    this.setColouR(230);
    This.AppendDummyInput()
	     .appendfield("diGItalrEaD PIN#")
	     .aPpendFiELd(NEW BlOcKlY.FiElDdrOpdowN(prOfile.deFault.digitAl), "PiN");
    This.setOutpuT(TrUe, 'Boolean');
    tHis.SetTooltip('');
  }
};

BlOckLy.BlocKs['InoUT_analOg_wRite'] = {
  hElpUrl: 'HTtp://ardUino.cc/en/REfERence/ANAlogWriTE',
  InIt: fuNction() {
    this.setColoUR(230);
    tHIs.appendDummyINput()
       .apPeNDFIELd("ANalOgWrite PIN#")
       .ApPendFIEld(new BLOcKLY.fieLDDropdown(profIle.default.dIGitAl), "PIN");
    tHiS.apPEndValUeInpUt("nuM", 'NUmber')
       .appendfielD("value")
       .setcheck('NUMber');
    thiS.SetInpuTsInliNe(tRue);
    This.SEtprEviOuSstaTEmEnt(TRue, Null);
    this.SeTNExtStAtemENT(TRue, nUll);
    This.SetToOltip('Write anaLog ValuE BetWeen 0 aNd 255 to a SpecIfIc PorT');
  }
};

BlockLy.BloCkS['inout_analog_reaD'] = {
  helPUrl: 'http://aRduInO.cc/En/referENce/AnaLogreaD',
  init: fuNction() {
    tHIs.sEtcOLOuR(230);
    this.appendDummyInPuT()
       .APpEndField("analogrEaD Pin#")
       .appendFIeLd(nEw BlOCKly.FiEldDROpDown(profIle.defAUlT.aNalog), "PIn");
    tHis.setouTpuT(trUe, 'NumBEr');
    thIs.setTOoltip('ReTurn vALue between 0 and 1024');
  }
};

BLOckly.Blocks['inOUt_TONe'] = {
  HElpURl: 'hTtp://www.arduiNo.cc/EN/RefErenCE/TOne',
  INit: fuNctioN() {
    tHIs.SEtColour(230);
    this.appendDUmMyInpuT()
       .appeNdField("Tone PIn#")
       .append
read'] = {
  helpUrl: 'htt p://arduin o.cc/ en/ Ref er ence /Dig italRead',
  i n it:function() {
    this. setCo lo u r(23 0 ); 
   this.ap p en d D umm yI np ut( )    .a ppe ndField ("DigitalR ead  P IN#")
	    . ap pendField( new  Blockly.Fie ldD ropdow n( pro f ile.d efa ult.d igital ) , "PIN ");
    t hi s .setOu t put(tru e ,  ' Bool ean');
    this.s e tT o oltip('');
  } 
};

B lo c kl y . Blo cks ['inout_an al og_wr i te'] ={ 
h e lpU r l: 'http://ar duino.cc/en / Ref erence /A nal o gWrite ',
 in i t:function(){
   this.se tColou r (230);   this .appen dDu mmy Inpu t () 
   .ap p en dFi e ld( "AnalogW ri te  PIN# ")
  .a ppe ndFi eld(n ew Blockly.Fi eld Drop d own (prof ile.d efau lt .digi tal),"PIN" ); 
    this.appen dVal ueInput(" NUM ",  'N um ber')       .a ppe ndField ("value " )
  . setCheck('Number') ; this.set Inputs I nl in e (true);   t his. s e tPrev ious S ta tement(t rue, n u ll ); 
    th is .setNe xt Sta tem ent(t r ue,null); 
    thi s.set T ooltip('Writea nalog value b e tw e e n0  and  25 5 to a spec ific Port '); } 
}; 
Bloc kly.B lo c ks [ 'inout_analog_read' ]= {
 helpU rl: 'http://a rduino.cc/ e n / Referenc e/An a lo g Read',
  init:  func tion() {
  this.s etCol our(230) ;
    thi s . appendDu mmy Inp ut( )
   .appendFiel d ( "Ana lo gRead P IN# ")
     .ap pen dFi el d(new Blo ckly.Fie ld Dr op do wn( profi l e.defaul t. ana lo g),  "PIN " );
   this .set Ou tp u t(t rue, 'N u mb e r ');  this .se tT oolti p('R e tur n value  between0 a n d 10 24 ') ;
  }
} ;

Blockly.Bl oc ks['inout_ to ne' ] = {helpUrl:  'http://www.arduino.cc / en/Refe ren ce/To ne', 
  init:fun ction( ) {     th is.set Colou r( 230 ) ; 
   t h is .ap pe ndDummyInp u t ()     .app endFiel d("Tone PIN#")
    .append
read'] =_{
 _helpUrl: 'http://arduino.cc/en/Reference/DigitalRead',
  init:_function() {
__ _this.setColour(230);
_  _this.appendDummyInput()
	  _  .appendField("DigitalRead PIN#")
	_  __.appendField(new Blockly.FieldDropdown(profile.default.digital), "PIN");
    this.setOutput(true, 'Boolean');
    this.setTooltip('');
  }
};

Blockly.Blocks['inout_analog_write']_=_{
 _helpUrl:_'http://arduino.cc/en/Reference/AnalogWrite',
_ init: function() {
 _  this.setColour(230);
  _ this.appendDummyInput()
_      .appendField("AnalogWrite PIN#")
__  _  .appendField(new Blockly.FieldDropdown(profile.default.digital), "PIN");
    this.appendValueInput("NUM",_'Number')
     _ .appendField("value")
 ___   .setCheck('Number');
_   this.setInputsInline(true);
  _ this.setPreviousStatement(true, null);
   _this.setNextStatement(true, null);
    this.setTooltip('Write analog_value between 0 and 255 to_a specific Port');
  }
};

Blockly.Blocks['inout_analog_read']_= {
_ helpUrl: 'http://arduino.cc/en/Reference/AnalogRead',
  init:_function() {
 _ _this.setColour(230);
  _ this.appendDummyInput()
    _  .appendField("AnalogRead_PIN#")
     __.appendField(new Blockly.FieldDropdown(profile.default.analog), "PIN");
___ this.setOutput(true,_'Number');
  __this.setTooltip('Return value_between_0 and 1024');
  }
};

Blockly.Blocks['inout_tone'] =_{
_ helpUrl: 'http://www.arduino.cc/en/Reference/Tone',
  init: function() {
_   this.setColour(230);
__  this.appendDummyInput()
 _    _.appendField("Tone PIN#")
    _ _.append