View on GitHub

optical-encoder-wheel-distance

Extension for using optical encoders. Can track disk slots and mm travelled.

Optical Encoder Extension for Microsoft MakeCode

Optical Encoder aims to make your Smart Robot Car more accurate and versatile by allowing you to track distance travelled and disk slots counted. This will let you make 90 degree turns and move set distances. For example to navigate a maze or a grid with set grid sizes. I was surprised to see there was not yet an encoder extension available so I made one myself. This is my first extension.

To use this Extension

This repository can be added as an extension in MakeCode.

Basic Overview

Add the Initial Setup block to your Start Block and enter the values for your specific parts. It will then automatically create counters based on your input and distance variables.

Initial Setup Values

Reset Counters

Variables - Counters

Variables - Distance

Encoder and Disk that I used EncoderDisk

Motors and Wheels that I used MotorWheels

Metadata (used for search, rendering)