This document describes a finite state machine for controlling a robot. The machine has two states - moving forward and changing condition. In the moving forward state, it checks the cycle times of the right and left motors to determine if it should turn right, turn left, or go straight. In the changing condition state, it sets the motor speeds to turn the robot right, left, or stop.
This document describes a finite state machine for controlling a robot. The machine has two states - moving forward and changing condition. In the moving forward state, it checks the cycle times of the right and left motors to determine if it should turn right, turn left, or go straight. In the changing condition state, it sets the motor speeds to turn the robot right, left, or stop.
This document describes a finite state machine for controlling a robot. The machine has two states - moving forward and changing condition. In the moving forward state, it checks the cycle times of the right and left motors to determine if it should turn right, turn left, or go straight. In the changing condition state, it sets the motor speeds to turn the robot right, left, or stop.
011111 001111 Rcycle < Lcycle 100111 Robot bergerak maju 110011 Rcycle = Lcycle 111001 111100 Rcycle > Lcycle 111110 100000 Motor Kanan = Low 110000 Motor Kiri = High 111000 Belok Kanan Robot berubah kondisi 000111 Motor Kanan = High 000011 Motor Kiri = Low 000001 Belok Kiri 000000 Stop