Hackster is hosting Hackster Cafe: Open Hardware Summit. Watch the stream live on Friday!Hackster is hosting Hackster Cafe: Open Hardware Summit. Stream on Friday!
Bhavithiran
Published © MIT

Program micro:bit mobile robot with Python | 4 Detect Object

A step by step guide to program a micro:bit mobile robot to detect object using MicroPython

BeginnerProtip30 minutes545
Program micro:bit mobile robot with Python | 4 Detect Object

Things used in this project

Hardware components

Cytron Technologies rero:micro
×1

Software apps and online services

Mu
Python Editor for micro:bit

Story

Read more

Code

Detect Object

Python
This tutorial's full code
from reromicro import *  

rero = reromicro()

while True:
    if (rero.ReadUltrasonic() < 15):
      rero.Brake()

    else:
      rero.RunMotor(50, 50)

Credits

Bhavithiran
16 projects • 7 followers
Contact

Comments

Please log in or sign up to comment.