The Robot Program Episode 020: Detect Face and Wave - RoboScratch

Description

This lesson will demonstrate how to use RoboScratch to have the robot wave once it detects a face. At the end of this lesson, readers will be able to enable facial detection and code a basic script using RoboScratch. Follow along with The Robot Program Episode 020: Detect Face and Wave - RoboScratch.

View the video episode here: https://www.ez-robot.com/Tutorials/Lesson/94

Professor E's Overview

This episode demonstrated how to enable facial detection and how to trigger an action using a RoboScratch script.

Always start with a fully charged, disconnected robot. Load EZ-Builder and connect to the robot. Open the bare robot project, which provides a clean workspace without unnecessary controls.

Add the control for the camera and test the camera view. The camera will provide peripheral information (external input/output that can be used to provide information).

Open the RoboScratch workspace. Add the WaitForFace command. This command tells the robot to wait until it detects a face before moving on to the next line of code.

Add Say and type in the desired speech. This command does not include a Wait, so it will execute and move immediately to the next command while the robot is still speaking.

Add Action (Wait) and choose an action, such as Wave. The use of Wait means that the action will be fully completed before moving on to the next line of code.

Use the green line and highlighting features to follow along with the linear execution of the script. Remember to disconnect, power off, and charge the robot when finished.

User-inserted image


ARC Pro

Upgrade to ARC Pro

Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.