Stirrer

kevinswelsen's picture

Attached the motor to a spoon so you don't have to manually stir anymore. Speed of the stirring is controlled by a potentiometer. When the pot-meter is turned to zero, the piezo speaker will let you know.

 

int potPin = 0;   
int motorPin = 9; 
int speakerPin = 10;
int val = 0;
 
void setup() {
  Serial.begin(9600);
  pinMode(speakerPin, OUTPUT);
}
void loop() {
  val = analogRead(potPin);  
  analogWrite(motorPin, val/4); 
  if (val == 0){{
      digitalWrite(speakerPin, HIGH);
      delay(10);
      digitalWrite(speakerPin, LOW);
    }
  }
}
stirrer_0.JPG
0
Your rating: None