Misty Lessons
  • Misty Lessons
    • 📖Welcome to Misty Lessons
    • 📚Get to know your Misty
    • 📲Connect to Misty
    • 👩‍💻Misty Studio
    • 🖥️Desktop Environment
    • ⬆️Update your Misty
    • 👥Projects
  • Blockly
    • 🧩Blockly Lessons
      • 🤸Lesson 1: Movement
      • 🎶Lesson 2: Voice and Sound
      • 🎭Lesson 3: Expressions
      • 🎥Lesson 4: Robot Cinema
      • 🛠️Lesson 5: Events
      • ☺️Lesson 6: Face recognition
      • 🔢Lesson 7: Variables and Functions
      • 💬Lesson 8: NLP
    • 🏫Blockly projects
  • Blockly Elements
    • ⚛️Misty Blocks
      • Movement
      • Speech
      • Audio
      • Vision
      • Events
      • Miscellaneous
      • NLP
      • System
    • 🔁Basic Blocks
      • Logic
      • Loops
      • Math
      • Text
      • Lists
    • 🅰️Advanced Blocks
      • Variables
      • Functions
  • Python
    • 🐍Python Lessons
      • 🦿Lesson 1: Loco-motion
      • 🤖Lesson 2 : Build a character
      • 🧠Lesson 3: Create memories
      • ⚒️Lesson 4: Event skills
      • 👀Lesson 5: Expand awareness
      • 🔗Lesson 6: Compact code
      • 🗣️Lesson 7: Start a conversation
  • Python Elements
    • 🐸Misty Python API
      • Motion and Mobility
      • Display and LED
      • Record Assets
      • Change/Remove Assets
      • Stream Assets
      • Get Assets
      • Events
      • Sensor Events
      • Speech and NLP
      • Arduino Backpack
      • System
      • Slam
    • 📗Python Definitions
  • Python Projects
    • 🔮MistyGPT
    • 🚨Misty Intruder Alert
    • 📺Conference Assistant
    • 🏷️QR code detector
    • 🕵️‍♂️Misty follow human
    • 👋Misty wave back
    • 🖲️Misty OA
    • 🌐Get weather
    • 🚚Misty Delivery
    • 🫂Motivational Misty
    • 🖼️Misty Museum Guide
    • 🎃Who for Halloween
  • ARDUINO
    • ♾️Arduino Backpack
    • 🦎Arduino
    • 🔧Arduino Lessons
      • 🔌Arduino to Misty
      • ➕Misty to Arduino
  • ARDUINO PROJECTS
    • 🛠️Misty Tracker
    • 🦾Misty Arm
  • Community Projects
    • 🌤️Misty weather forecaster
  • HARDWARE EXTENSION
    • ⚙️Arduino breadboard support
    • 🦾Misty arm
    • 🥤Tin holder
  • Resource Database
    • 📁Image files
    • 📁Audio files
    • 📁Languages
    • 📁Known objects
    • 📁NLP Actions
    • 📁Action Commands
    • 📁ChatGPT PDF files
    • 📁AR Tag Dictionary
    • ⚙️Technical Specifications
Powered by GitBook
On this page
  • Setting up a desktop environment for Python in Windows
  • Step 1. Power on Misty
  • Step 1. Download your code editor and program packages
  • Step 3. Set up a Path
  • Step 4. Install Dependencies
  • Step 5. Create Robot Generator
  • Step 6. Create your Python Project
  1. Misty Lessons

Desktop Environment

Last updated 1 year ago

If you're already an experienced roboticist and developer you can program Misty by setting up your own desktop environment and code editor. There you can program Misty using Python, C# or JavaScript. While you can do most of your programming in Misty Studio, for more complex programs that require external dependencies you may need to use your preferred code editor.

Setting up a desktop environment for Python in Windows

Step 1. Power on Misty

Misty has to be powered on and connected to your WIFI network in order to receive commands.

Step 1. Download your code editor and program packages

In order to start setting a desktop environment to program Misty in Python you will need to download a code editor, a Python installer and the Misty Python SDK package. For your code editor you can use Visual Studio Code or any other Python editor.

Step 3. Set up a Path

Once you've installed Visual Studio Code and Python on your computer, you will need to create a working directory where you can extract the Misty Python SDK package zip file. The extracted contents can be place in any folder on your desktop. (For example C:\Users\YourName\Desktop\ MistyPythonSDK) Now to be able to put the code editor, Python and the Misty SDK in same desktop environment and establish a working path, you will need to search and open 'Edit the system environment variables' function in the Windows Search Bar. You will see window called System Properties, click on the button called Environment Variables.

After you open the environment variables windows you will see a section with a list of folders, choose 'Path' and click on the button 'Edit'.

Inside the path folder you will need to add all the folders paths that contain your code editor and python executables, as well as python packages and the working directory with the Misty Python SDK.

Step 4. Install Dependencies

In your Visual Studio Code you will need to set your working directory as the default directory for the terminal. This can be done in settings by searching "terminal.integrated.cwd" and writing in the folder path of the working directory. Now you can navigate back to your terminal and install the following dependencies. Place them in your terminal and press Enter. In some case you will need to install additional dependencies if you want to use more Python libraries. Visual Studio Code will highlight the lines of code that need additional dependencies to work, by hovering over the line you can use 'Quick Fix' to find the dependency you need.

pip install 'requests>=2.25.1'
pip install 'websocket-client<=0.57.0'
pip install 'yapf>=0.30.0'

Step 5. Create Robot Generator

To be able to connect to Misty via her IP address and use the API endpoints you will need to create a Python file in your working directory called update.py . Save the file and run it using the command python update.py in your terminal.

from mistyPy.GenerateRobot import RobotGenerator
RobotGenerator("ROBOT-IP_ADDRESS-GOES-HERE")

Step 6. Create your Python Project

Congratulations! You have now set up your desktop environment for Misty. You can now create a Python project and start programming Misty. Remember to keep your project file in the same folder path as your Misty Python SDK. You can run your program by using the run button in the top right corner and cancel your program by deleting the terminal session or pressing Control + C.

🖥️
Download Visual Studio Code
Download Python Installer
Download Misty Python SDK