This paper describes a sensing-actuation coupling of a robotic trout that detects changes of the laminar flow speed using an on-board pressure sensor and adjusts its tail-beat frequency for steady swimming. The caudal fin actuator closely mimics the morphology of a real trout, in particular the geometry, stiffness and stiffness distribution of the body and the caudal fin. We hypothesize that the linear relationship between the tail-beat frequency and speed, well-known and proven to hold for all fish studied so far, also holds for an artificial fish. We validate the hypothesis and use the results to derive a linear control law to adjust the tail beat frequency to the swimming speed. We use an onboard pressure sensor to detect the flow speed and test the actuation in a controlled hydrodynamic environment in a flow pipe.