BESS micro-controller algorithms