working together

举报

发布于:2022-04-09

更新于:2022-04-09

0

710

LilyAndTheRanger2

0M/ 0.1M

作品介绍:

You need an mBot AND an mBot Ranger for this code to work. It must be done in live mode: it sends messages to the computer to be sent back to the other robot. Since I don't actually have my own mBot, this code is not tested. Leave tips and suggestions in the comments, please!

操作说明:

You drive the Ranger around until it sees an obstacle(ultrasonic's the best!), and if it sees one, it will stop, turn on red lights, and beep until you help it. The mBot will hang out with you, alerting you if the Ranger sees an obstacle(in case the Ranger is far away!) by also turning on red lights and beeping. The mBot's alerts can be turned off by pressing the on-board button. Oh, and using a potentiometer in port 6 lets you adjust the speed.

收藏