This Arduino Pump Tutorial is known as the ShotBot Project, demonstrating an easy way to build a simple shot pouring robot. We use two RobotGeek Pumping stations and some quick code to create a dual shot pouring robot. This project uses buttons to trigger the pouring as a basic example, but the buttons could be replaced with more advanced sensors, such as switches, light sensors, or IR sensors. You can follow the directions here, or find this project on the RobotGeek Learn site in two parts: The RobotGeek Pumping Station Assembly Guide, and the Arduino Pump Tutorial.
The following parts are recommended if you'd like to build as we have in this guide. The idea of using a two separate types of button presses to activate a pump via relay in an arduino environment is applicable to other sets of parts, but the parts listed here will guarantee success.