Communication with Thymio II robot from Thonny via the Thymio Device Manager
Project description
Thymio plugin for Thonny
The Python module tdmclient_ty
is a plug-in for Thonny, the Python IDE for beginners. Based on the module tdmclient
, it lets you run Python programs on the Thymio II mobile robot.
Like tdmclient, the plug-in relies on Thymio Suite and its Thymio Device Manager component to communicate with the robot.
Installation
In Thonny, select the menu Tools>Manage Packages, type tdmclient_ty in the search box, and click the button Search on PyPI. Click the link tdmclient_ty in the result list (normally the only result), then the Install button below.
Make sure you also have Thymio Suite installed on your computer.
Use
Connect a robot to your computer via a USB cable or the RF dongle and launch Thymio Suite. In Thymio Suite, you can click the Aseba Studio icon to check that the Thymio is recognized, and, also optionally, start Aseba Studio (select the robot and click the button "Program with Aseba Studio"). Only one client can control the robot at the same time to change a variable or run a program. Either don't start Aseba Studio or unlock the robot by clicking the little lock icon in the tab title near the top left corner of the Aseba Studio window.
The plug-in adds four commands in the Tools menu:
- Run on Thymio: run the program in the editor panel on the Thymio. First the program is converted (transpiled) to Aseba, the programming language of the Thymio. Then this Aseba program is loaded on the robot and started.
- Transpile Program: transpile the program in the editor panel from Python to Aseba and display the result in the Shell panel.
- Stop Thymio: stop the program which runs on the robot and the robot itself.
- Unlock Thymio: release control of the robot. The first time you execute Run on Thymio or Stop Thymio, an exclusive connection is established with the robot and no other program can control it. Unlock Thymio ends this connection until the next time you execute Run on Thymio or Stop Thymio. It can be useful to control the robot alternatively from Thonny and other applications, such as Aseba Studio or Scratch in Thymio Suite or tdmclient in Jupyter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for tdmclient_ty-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bdfa89dbb80784ccdfb8878002aa48a553c97740af4e12e05e6a9f4d38786f7 |
|
MD5 | e5625436944ab0472fe6877d82ad10a1 |
|
BLAKE2b-256 | ab149efcc4c8e7037b6b0ce51368add908f240e3be28bea3f12cd151e6e09b38 |