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 minutes272
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

Bhavithiran

11 projects • 4 followers

Comments