Skip to content

Using a PID controller on a BBC Microbit to synchronise 2 motors

Notifications You must be signed in to change notification settings

Hybricks/PID-for-microbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PID-for-microbit

This is an adjusted version of the Python PID controller by ivmech https://github.com/ivmech/ivPID/blob/master/README.md

It is adjusted to make it run on a BBC Microbit board written in MicroPython. Main changes are in the use of the 'time' functions.

IMG_2119

The great thing about this implementation is the use of a PID-object, in stead of doing the PID calculations in your Main-loop. This enables more PID controllers at the same time. Great stuff when trying to sync 4 motors in 1 vehicle ;)

You'll find:

  1. PIDClass.py The PID-object code
  2. MotorSync.py The main body syncing 2 motors using the accelerometer
  3. MotorSyncUX.py The main body including the UX for setting the PID parameters interactively

For further explanation please have a look at the YouTube video here: https://youtu.be/fMj4k6QnzZg

About

Using a PID controller on a BBC Microbit to synchronise 2 motors

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages