Multi-Behavior State Machine

Multi-Behavior State Machine

animation
sensors

Multi-Behavior State Machine

Goal: Robot switches between fear/aggression/love modes using a button.

Modes:

  1. Fear mode (same-side excitatory): Runs from light
  2. Aggression mode (cross-wired excitatory): Attacks light
  3. Love mode (same-side inhibitory): Approaches and stops near light

Challenge: Implement smooth transitions between modes, add LED indicators for current mode

Bonus: Add a fourth mode: “Explorer” (cross-wired inhibitory) for obstacle avoidance (Roomba-like)

Back to the chapter