Absolute noob:Looking to power a waterpump for 1 minute on the push of a button
hi, i'm new world of arduino , relatively inexperienced in electronics, have basic knowledge , understanding , have made simple led circuits ans such nothing this. seems project start , reading existing posts possible arduino. on is:
what purchase? in first board.
is feasible?
i appreciate available, have scoured forums similar topics , found 1 here, http://forum.arduino.cc/index.php/topic,44509.0.html cannot make sense of currently, , need hardware side of things first, can building.
many thanks!
what purchase? in first board.
is feasible?
i appreciate available, have scoured forums similar topics , found 1 here, http://forum.arduino.cc/index.php/topic,44509.0.html cannot make sense of currently, , need hardware side of things first, can building.
many thanks!
any arduino work.
code: [select]
const int buttonpin = 2;
const int relaypin = 3;
void setup() {
pinmode(buttonpin, input_pullup);
digitalwrite(relaypin, low);
pinmode(relaypin, output);
}
void loop() {
if (digitalread(buttonpin) == low) { // if button ground closed
digitalwrite(relaypin, high); // turn on relay
delay(60000); // wait 60 seconds
digitalwrite(relaypin, low); // tun off relay
}
}
Arduino Forum > Using Arduino > Project Guidance > Absolute noob:Looking to power a waterpump for 1 minute on the push of a button
arduino
Comments
Post a Comment