Self balancing robot but not balance

Adding to your list of things to do... learn to write "non-blocking" code. Your devices will need to operate "immediately" (when the vehicle tips or moves... which is all the time) and not wait for code running another device. For this, read about "arduino multiple events." I do not have knowledge enough to help you through the balancing logic.