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’)
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:
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’]
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.
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: