Firmware for driving a bluetooth controlled robot