AR logo.png

ANNIN ROBOTICS

0
  • HOME

  • TUTORIALS

  • DOWNLOADS & MANUALS

  • ROBOT KITS

  • FORUM

  • BLOG

  • CONTACT

  • More

    1. ROBOT FORUM
    2. Questions
    3. if on jump... dont work
    Search
    massimo
    May 30, 2019

    if on jump... dont work

    Question, the "if on jump" command does not work, and "if off jump". the arduino entry works, because on the previous line I inserted a "wait on". come can i fix? Thank you.

    0
    massimo
    May 30, 2019

    Resolved. change "ser.readline ()" to "ser.read ()".

    0
    massimo
    May 30, 2019

    ##If Input On Jump to Tab##

    if (cmdType == "If On "):

    inputIndex = command.find("Input-")

    tabIndex = command.find("Tab-")

    inputNum = str(command[inputIndex+6:tabIndex-9])

    tabNum = str(command[tabIndex+4:])

    command = "JFX"+inputNum+"T"+tabNum+"\n"

    ser.write(command.encode())

    ser.flushInput()

    time.sleep(.2)

    value = ser.readline() ***************************************************this with: value = ser.read()

    if (value == b'T'):

    index = tab1.progView.get(0, "end").index("Tab Number " + tabNum)

    index = index-1

    tab1.progView.selection_clear(0, END)

    tab1.progView.select_set(index)

    ##If Input Off Jump to Tab##

    if (cmdType == "If Off"):

    inputIndex = command.find("Input-")

    tabIndex = command.find("Tab-")

    inputNum = str(command[inputIndex+6:tabIndex-9])

    tabNum = str(command[tabIndex+4:])

    command = "JFX"+inputNum+"T"+tabNum+"\n"

    ser.write(command.encode())

    ser.flushInput()

    time.sleep(.2)

    value = ser.readline() ************************************************and this with: value = ser.read()

    if (value == b'F'):

    index = tab1.progView.get(0, "end").index("Tab Number " + tabNum)

    index = index-1

    tab1.progView.selection_clear(0, END)

    tab1.progView.select_set(index)

    0
    Chris Annin
    May 30, 2019

    Thank you for the input, Ill look into why it wasn't working with ser.readline.

    Chris

    0