added base for modes, and implemented voltage mode
added bangbang