The Arduino board outputs 5V and 40mA per GPIO pin, which is insufficient for the Brewista's need of 12V and 1.4A. To address this, we need to use external components such as a motor shield to boost the voltage and current.
A motor shield is used to increase the voltage and current supplied to the motors. By using MOSFETs or transistors along with motor drivers, the shield can provide 12V and 1.2A to power the 12V pumps in our project.
This is the adjustRecipe function that is used when the user wants to customize their drinks. We keep the information of the user’s customized drink in a length 4 array of doubles called recipe consisting of:
{ratio of cherry syrup,
ratio of lime syrup,
ratio of vanilla syrup,
whether or not to add half and half via boolean int}
The pumpIndex is the pump we are adjusting, ex. pumpIndex = 0 means that we are adjusting the ratio of cherry syrup. Increment is a double of the ratio the user would like to add to the recipe.