How to control Arduino program with Python GUI? : <p>I need help figuring how to control an Arduino program using a Python GUI. This is my first project involving user-interface design and Arduino so I don't know where to start with this task. Any starting tips or help would be greatly appreciated.</p>

<p>The Arduino program is provided to me and the main function I am focusing on involves moving several motors to control a platform. So far I have created a basic GUI using the PyQt5 GUI Designer that allows for movement in the x, y, and z directions of the platform.</p>

<p>I would first like to figure out how to execute a simple command such as setting the platform to the "Home" position (x, y, and z values set to 0) using the Python GUI first.</p>

<p>This is the code in the Arduino program that I believe is involved in setting the platform to the "Home" position:</p>

<pre><code>void goHome(){  
  setPos(arr0);
  if (altech == 1) { moveDiffSpd(servo_pos, spdOld); }
  if (altech == 2) { moveBresenham(servo_pos, spdOld); }
  getSerPos0(servo_pos);
}

void presetHome(){ 
  setPos(arr0);
  // Return directly to HOME position
  for (int i=0; i&lt;6; i++){
    if (Dynamixel.readPosition(i+1)!=servo_pos[i]) { 
Dynamixel.moveSpeedRW(i+1,servo_pos[i],spdOld);  }
  }
  Dynamixel.action();
  getSerPos0(servo_pos);
}
</code></pre>

<p>I have very little experience with Arduino so there may be more in the code involved than this, if more are needed I may be able to provide that.</p>

<p>This function is called when "H" is entered in the Arduino command line. </p>

<p>Essentially I am trying to create an interface that would be able to the same thing as entering "H" to return to home but by clicking a button instead of typing out the command. Ideally I would be able to do this with the interface I created using PyQt5, but if another GUI program is more effective I could look into that.</p>

<p>Again any help or starting points are appreciated. Thanks!</p>
