def glue(off=False): sb = createStringBlock(off, 'glue', 'darkblue') sb.addCodeElement("junte") sb.addArgumentHolder(createStringBlockHolder(off, sb)) sb.addCodeElement("com") sb.addArgumentHolder(createStringBlockHolder(off, sb)) return sb
def println(off=False): sb = createStatementBlock(off, 'println', 'darkblue') sb.addCodeElement('escreve no monitor serial') sb.addCodeElement() sb.addArgumentHolder(createStringBlockHolder(off, sb)) sb.addCodeElement() return sb
def setLcd(off=False): sb = createStatementBlock(off, 'setLcd') sb.addCodeElement('escreve no') sb.addVariableElement('lcd', countComponents, 'component_lcd') sb.addCodeElement(gettext_noop('text')) sb.addArgumentHolder(createStringBlockHolder(off, sb)) return sb
def waitForTheSignal(off=False): sb = createStatementBlock(off, 'waitForTheSignal', 'purple') sb.addCodeElement('espere pelo sinal') sb.addArgumentHolder(createStringBlockHolder(off, sb)) sb.addCodeElement() sb.addVariableElement('infravermelho', countComponents, 'component_IR') return sb
def setAlphaNumericVar(off=False): sb = createStatementBlock(off, 'setAlphaNumericVar', 'red') sb.addCodeElement('mude') sb.addVariableElement(TITLE_ALPHANUMERIC_VAR, alphaNumericVars) sb.addCodeElement('para') sb.addCodeElement() sb.addArgumentHolder(createStringBlockHolder(off, sb)) sb.addCodeElement() return sb
def waitForTheMsg(off=False): sb = createStatementBlock(off, 'waitForTheMsg', 'darkblue') sb.addCodeElement('espere pela msg') sb.addArgumentHolder(createStringBlockHolder(off, sb)) sb.addCodeElement('monitor serial') return sb
def alphanumericOperation(name, operator, off): bb = createBooleanBlock(off, name, 'darkblue') bb.addArgumentHolder(createStringBlockHolder(off, bb)) bb.addCodeElement(operator, {'=': 'str_equals', '≠': 'str_not_equals'}) bb.addArgumentHolder(createStringBlockHolder(off, bb)) return bb
def StrToInt(off=False): nb = createNumberBlock(off, 'StrToInt', 'darkblue') nb.addCodeElement("converte") nb.addArgumentHolder(createStringBlockHolder(off, nb)) return nb