Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Tic T500 Python3 homing problem

Hi. I’m trying to run Tic500 in Python 3, on Raspberry PI. All commands seem working, but when I try homing, I have the following error: "Error: Unknown option: ‘–home rev’ "

the code looks like that:
ticcmd(’-d’, tic_serial_number , ‘–home rev’)

What do I do wrong?

Thank you

Hello, vaasG.

I moved your post to its own thread since it seemed different enough to warrant it’s own topic.

Your code is close to being correct, but --home and rev need to be passed in as separate arguments, similarly to how you have -d and tic_serial_number. Like this:

ticcmd('-d', tic_serial_number, '--home', 'rev')


Thank you Brandon. Works now:)

1 Like

Hi, I have another related question: when trying to read variable “Misc flags 1”, Python returns error KeyError: ‘Misc flags 1’
the code is just:
status = yaml.load(ticcmd(’-d’, tic_filters , ‘-s’, ‘–full’))
flags = status [‘Misc flags 1’]

What might be the issue?

You are receiving an error because ticcmd -s --full does not output anything that matches “Misc flags 1”. You can run that command in a shell to see what it outputs.


Thank you Brandon. I’ll use ‘position uncertain’ output to figure out if my homing procedure was done. After a set of commands:

ticcmd -d  00299119 --energize
ticcmd -d 00299119 --exit-safe-start
ticcmd -d 00299119 --home rev
ticcmd -d 00299119 -s --full

the list shows that the reverse limit is not active, although ‘position uncertain’ is in ‘No’, and I know that the sensor is active.

In ticgui I can see that the reverse homing sensor is active (yellow) when I click ‘home reverse’ in the menu.

If you know why this is the case please let me know, otherwise, as I mentioned, I’ll just use the reading from the ‘position uncertain’

Hi, if I run ticcmd -d 00299119 -s --full, I can see the readings from RC pin:
RC pin:
Digital reading: 0 or 1 (depends if the switch is on/off).

How can I read this value in Python? What command should I use? At the moment I use the following set:

status = yaml.load(ticcmd(’-d’, tic_filters , ‘-s’, ‘–full’))
user = status [‘RC input’]

But I get KeyError: ‘RC input’ error message.

thank you

None of the ticcmd commands are blocking, including --home, so if you are reading the status right after telling it to home, the limit switch probably hasn’t been triggered yet.

I moved your post about reading the RC input back to this thread since it is essentially the same problem that you posted about previously; ticcmd -s --full does not output anything that matches “RC input”. I recommend trying each of these lines of code and looking at the output from each of them so you can understand what is going on:

print(status["RC pin"])
print(status["RC pin"]["Digital reading"])