Environmental control systems are important tools for experimental researchers studying animal-environment interactions. Commercial systems for measurement and regulation of environmental oxygen conditions are relatively expensive and can not always be adapted to varying experimental applications. Here, we present a low-cost and highly flexible oxygen control system using Arduino microcontrollers in combination with a commercial optical oxygen sensor. We show dissolved oxygen (DO) measurements from three experiments that were conducted with mormyrid fish with different DO regimes: 1) acute challenge with defined rates of DO change from normoxia (> 90% air saturation) to hypoxia (10% air saturation), 2) acute stepwise hypoxia in a shuttle-box setup, and 3) long-term hypoxia (15 % air saturation) that was maintained for eight weeks in the home tank of the fish. Overall, the microcontroller-based DO control systems produced the desired experimental conditions with a high and inter-trial correlation (Pearson’s R ≥ 0.987) and sufficient precision, except for the shuttle-box setup, where the lowest DO step of 10% air saturation could not be reached.