Problems with PiDog kit

Hello,

I assembled a PiDog kit from Sunfounder, and here are the components of my setup:

  • Windows 11 on the PC
  • Installed Raspberry Pi 3b
  • Raspberry Pi 4 (not installed but already tested)
  • OS environment of the card: Debian Bookworm 32-bit
  • 64 GB SD card
  • Real VNC configured and functional
  • Putty configured and functional
  • Fully charged battery

My problem is as follows:

I manage to use the provided examples with Putty, and everything works well. I call the programs one after the other without any problem, and I use Ctrl+C to stop my program, everything is OK.

When I use VNC and call the graphical programming console for Python3 and run an example in Python3, I manage to launch the program, but I am unable to stop the program with the Stop button or the Ctrl+C command. The robot freezes, and I have to close everything and start over.

I replaced the Raspberry Pi 4 that I initially installed with a Raspberry Pi 3b, thinking it would demand less from the battery, but the problem remains the same.

My preference would be to program my robot directly from the Python 3 graphical interface on my Raspberry and see the results of the programming I have done in real-time. Is this possible?

Another problem I encountered during a previous experiment was using the Sunfounder Controller from an Apple tablet. I managed to use the console, linked it with the robot, and controlled my ROBOT; everything was relatively stable. When I wanted to return to Putty, I was unable to do so; the robot was no longer recognized as if I had overwritten modules required by Putty to function. Is there a solution?

Can you help me?

I want to use Thonny

ctrl-c in a terminal sends a SIGINT, which allows the process to clean up, allowing the robot to return to a known state. However, as far as I know, Thonny grabs the ctrl-c/stop and sends a SIGKILL instead, which does not allow clean up and can leave the robot in an unknown state.

Is there an alternative to stop the program and give control back to the user?

Thanks

I think what you need for the robot recovery would be hardware dependent, so I personally don’t see how thonny would know how to do that.

You may be able to write your own systemd ExecStopPost= type of process which may be able to restart cleanly, not sure.

I’d suggest awaiting a moderator to answer, they’re far more knowledgeable than I.

You could also put in a request to the thonny owners.

Thanks for your helps. I will send my request to moderator

Bye

Welcome
Sorry I could not do more.