Our aim is to develop a bacterial-based swarm algorithm that adjusts the parameter values of a fuzzy model. The bacterial-based swarm algorithm is simplified in order to adjust the parameters of the fuzzy model. The procedure of the bacterial swarm algorithm simulates the movement of an E. coli bacterium through swimming and tumbling in problem search space in order to find the optimal solution. A bacterial-based swarm controller has been presented for a self-balancing two-wheeled vehicle. We utilize computer simulation and hardware implementation to verify applicability and effectiveness of the proposed method.