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
  • Aim
  • Arm Movements
  • Challenge 1: Wave a hello
  • Challenge 2: Sequence your waves
  • Head Movements
  • Challenge 3: Look around the room
  • Challenge 4: Robot Dance
  • Challenge 5: Let's do it again!
  • Driving
  • Challenge 6: Let's get Misty rolling
  • Challenge 7: Create a path
  • Challenge 8: Curvy road
  • Challenge 9: Red Carpet
  • Up Next 👇
  1. Blockly
  2. Blockly Lessons

Lesson 1: Movement

Last updated 1 year ago

Aim

Welcome to your very first lesson in Misty Blockly! The aim of this lesson is to explore Misty's range of motion and help you understand how to program her to move. If you have any questions about the individual movement blocks, you can check out the Movement section under Blockly Elements.

Arm Movements

Challenge 1: Wave a hello

When you meet a robot for the first time it can be a little scary since you don't know what it will do, that's why it's important to start your interaction with a greeting. It's not only an ice-breaker, but also a fun way to let humans know that Misty is a friend. Let's get Misty to wave her arms! Select the arm block from the 'Movement' tab in Misty Blocks and place it in your Blockly workspace. With this block you can control both her arms, since her arm range is limited, you can choose values between -90 (up) and 90 (down). You can also choose the speed of the arm movements with values between 0 and 100. Try out different combinations!

Challenge 2: Sequence your waves

If you don't want to get stuck changing the values of your arms every time, you can create a sequence by adding a second arm movement block. To run your arms in a timed sequence you'll need to use the timer block between the two arm blocks. This block will help you to determine the amount of time you need for each block to run. You can find the timer block in the 'Miscellaneous' tab in Misty Blocks. The minimum amount of time you can set is 0.1 seconds (100ms). Try starting with 1 second (1000ms).

Note: If you don't use a timer block the program will try to run every block at the same time in the sequence and the sequence may not be completed. When you are testing your program adjust the timer to allow Misty to complete each action in the sequence. It's not necessary to insert a timer block between two movement blocks of different kinds. For example, Misty's arms and head have different motors so they will still execute the code independently, but if you put two arm blocks together, they will both try to run at the same time.

Now you can connect the second arm block to your timer to make Misty raise her right hand and pull down her left hand. Wait one second and then switch them. You can also try out using different values. What's missing? Make the greeting as natural as you can!

Head Movements

Challenge 3: Look around the room

Now that you are comfortable with moving Misty's arms, let's explore how to get her to look around the room. Select the head block from the 'Movement' tab in Misty blocks and place it under your arm sequence, don't connect it just yet. Pitch is the first head range that you can use to make Misty look up or down. The pitch range values are -40 (up) to 25 (down). To make Misty roll her head left or right, you can change the roll range values from -90 (right) to 90 (left). Finally, if you want Misty to simply turn her head left or right, you can use the head yaw range values -42 (left) to 42 (right). Remember that you can choose the movement velocity. Give it a go!

Challenge 4: Robot Dance

Once you are familiar with how to move Misty's head, you can start combining different movement blocks, let's try to connect the head block to an arm sequence and program Misty to dance. Remember to use the timer block to time your sequence.

Challenge 5: Let's do it again!

Do you want to run the sequence again? Instead of clicking the 'Run' button every time, you can use the repeat block found in the Basic Blocks 'Loops' tab and choose how many time you would like Misty to repeat the sequence. Repeat blocks are very useful if you would like to save time and avoid rebuilding the same sequences. Find out more about loops here: Loops

Driving

Challenge 6: Let's get Misty rolling

Now that you have a hang of how to move Misty's arms and head, let's get Misty rolling. Misty has tracks that allow her to drive anywhere in your room and turn at any angle, giving you full control of where you want her to go. Select the drive block and choose the values for linear velocity, angular velocity and time. The linear velocity sets Misty's speed in a straight line, its range is -100(backward) to 100(forward). The angular velocity sets Misty's speed in rotation, its range is -100(clockwise) to 100 (counter-clockwise). You can also set the duration in seconds. Try it out!

Challenge 7: Create a path

Great job! You've got Misty rolling, let's give her a little guidance on where to go. Connect the blocks to make Misty drive forward for 3 seconds, turn right, and drive forward for 3 seconds more. Try out different combinations until you feel happy with your path plan.

Challenge 8: Curvy road

If you don't like going in a straight line, well then Misty has the right block for you. The drive arc block allows you to make Misty drive at a curve. Select the block and choose a value for heading, radius and duration. For example, you can run this block to make Misty drive an arc of 0.5 meters of radius, doing half circumference in 5 seconds. Try it out and find the values that you are most comfortable with.

Challenge 9: Red Carpet

Finally, let's combine what we've learned and imagine Misty just rolled out onto a red carpet to show off her incredible talents. You can get her to drive forward and greet everyone on the left and right two times, and stop her one second after she has finished saying hello to all her fans.

Up Next

👇
🎶Lesson 2: Voice and Sound
🧩
🤸
Page cover image