Forums Niryo One How to… Sending Python API commands to RaspberryPi via ssh from host Reply To: Sending Python API commands to RaspberryPi via ssh from host

Post count: 5

I’m glad I could contribute something. I have this other idea I want to
mention. I have no one to help me train my Niryo One and I found that when I
put it in learning mode, position the arm, and then reach for the mouse to
click on the plus sign in the Blockly window, I tend to move the arm a little bit. I could not
position it accurately. So I rigged up a footswitch. It’s a bit of a kludge.

I took an Arduino-like board (I used a Texas Instruments MSP-EXP430G2
LaunchPad)and wired up a switch with a wire long enough to sit on the floor.
When I tap the switch with my foot, the microcontroller sends a character to
the host computer. I read this with a python script, and from that I call a
program named xdotool. (This is for a Linux host. I hope there is some similar
program for windows.) Xdotool can perform mouse clicks at designated locations
in a designated window. So the python script on the host running Niryo Studio
clicks the plus sign and then the button for Add Block in the Add Position
Block pop-up window. I haven’t used this a lot, but it seems to work.