예제 #1
0
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
예제 #2
0
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
예제 #3
0
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
예제 #4
0
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
예제 #5
0
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
예제 #6
0
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
예제 #7
0
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
예제 #8
0
def StrToInt(off=False):
    nb = createNumberBlock(off, 'StrToInt', 'darkblue')
    nb.addCodeElement("converte")
    nb.addArgumentHolder(createStringBlockHolder(off, nb))
    return nb