Online trajectory generation for robots with multiple degrees of freedom is still a difficult and unsolved problem, in particular for non-steady state locomotion, that is, when the robot has to move in a complex environment with continuous variations of the speed, direction, and type of locomotor behavior. In this article we address the problem of controlling the non-steady state swimming and crawling of a novel fish robot. For this, we have designed a control architecture based on a central pattern generator (CPG) implemented as a system of coupled nonlinear oscillators. The CPG, like its biological counterpart, can produce coordinated patterns of rhythmic activity while being modulated by simple control parameters. To test our controller, we designed BoxyBot, a simple fish robot with three actuated fins capable of swimming in water and crawling on firm ground. Using the CPG model, the robot is capable of performing and switching between a variety of different locomotor behaviors suc...