I'm trying to build a simple system to turn a water pump every 24 hours for 10-20 seconds. I have 5V pump. When I connect it to 5V, GND it works but when I connect it to pin 12 (or any other digital pin) and GND it does not work. Here's my sample sketch:
int led = 12;
void setup() {
Serial.begin(9600);
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
}
What am I doing wrong?
No comments:
Post a Comment