![]() ![]() Time.sleep(0. This program currently only supports English.įrom pynput.keyboard import Key, ControllerĬ("Enter the cloud service authorization code") # You can get it through your mBlock accountĬ("WIFI name", "WIFI password")Ĭ("WIFI connected")Ĭ("-")Ĭ("Press the button A to start voice recognition")Ĭ("Start voice recognition") The result of voice recognition will be printed out in a file through pynput. Use the voice recognition function of Cyber Pi, and the keyboard control function of pynput module. Time.sleep(0.01) CyberPi voice typer """" You can also use the Bluetooth module to convert Cyber Pi into a wireless mouse.įrom pynput.mouse import Button, Controller Use the gyroscope module, buttons of Cyber Pi, and the mouse control function of pynput module, to convert Cyber Pi into a mouse. Refer to the above step pip install pynput """" NoteĬurrently on a third-party editor, you can program CyberPi only in online mode. Type pip install cyberpi in the CMD window and press Enter, and wait till the librarry is installed.įor description of the Python APIs, see Python API Documentation for CyberPi.Īfter the installation is completed, you can write programs on the editor for which a Python environment has been configured. (3) Install the cyberpi library, a Python library for programming CyberPi in online mode. Type pip install pyserial in the CMD window and press Enter, and wait till the librarry is installed. (2) Install the pyserial library, which enables CyberPi to connect to the third-party editor through a USB cable or Bluetooth dongle. (1) In Windows OS, press Windows + R on the keyboard, type CMD and press Enter. Prepare the third party editor for programming CyberPi py file and you can write basic Python programs. (6) Configure the previously installed Python environment on the VS Code editor. (4) On the left side of the software page, click the icon marked in the following figure. (3) Click the VS Code icon on the desktop to open it. By default, Spyder checks for updates automatically on startup, and you can also check manually with Help Check for updates.The standalone installers for Spyder 5.4.0+ include update functionality built right into Spyder, which after checking for updates will display a prompt to automatically download and install the current version. (2) Double-click the downloaded installation package to install it. (1) Download a VS Code version applicable to your operating system. It is also recommended that you configure the installed Python environment on the editor. Note: The steps may vary depending on the editor you are using. Install and configure the third-party Python editor (use Visual Studio Code as an example) You can also click Customize installation to install Python environment to a specified directory.Ģ. (2) Double-click the software you’ve downloaded, check Add Python 3.6 to PATH, and click Install Now. For example, versions later than 3.9 doesn’t support Windows 7. The latest version may fail to work properly. (1) Go to the to select and download a Python version that is applicable to your operating system. Use the following statements to install the libraries: pip install pyserial ![]() To program CyberPi on the third-party editor, you need to intsall the pyserial and cyberpi libraries in the Python environment configured for the editor. If you have installed a Python environment and third-party editor, go to step 3. This page describes how to program CyberPi with a third-party Python editor on Windows. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |