Code for Magabot with custom electronics