05 Quick Start

Problem

Your mission is to create a robot that starts an interaction when a human approaches. Your robot should be friendly and act as naturally as possible.


Design

Your robot will interact by waving when a person approaches. Walk around and wave at a few people or stuffed animals. Count how many times you move your hand back and forth, what side do you start with, how far do you tilt your hand?


Build

Assembled your servo and plug it into either the Servo 1 or Servo 2 ports. You'll find them on the side of your red board, around the corner from the AD and I2C ports. 

Also attach your distance sensor and plug it into an AD port.


Code: Doing the Wave

First, center your servo, rotate it 90*, and release it. 

Then tweak your code to be more specific about how many degrees the servo rotates, and for how long. 

Always remember to release your servo at the end of your program.


Code: Responsive Robotics

Set up a conditional function and fill it with the waving program you just created. You may need to add another layer of a forever-do loop to keep the robot checking for approaching objects. 

You can add complexity to your program by having the robot adjust its wave based on whether the object it senses is moving closer or further away.


Test

Test your robot by approaching from different angles and different speeds. Does your robot start waving at you at the right distance?



Iterate

Fine tune your program by tweaking the speed of your robot's wave,  how far it waves in each directions, and how sensitive it is to objects in the environment. 

Consider how this robot might be more useful for you. Should it sit facing out a front window to wave at passers-by?



Last modified: Monday, 28 November 2022, 10:26 AM