Hello all,
I'm having difficulty trying to get this water atomiser, (Grove - Water Atomization | Seeed Studio Wiki) to work with simple push button....
I've tried using the code....
/*
Demo code for grove atomization.
Touch to start atomizing.
Last modified by he
by xiaohe
*/
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 13 as an output.
pinMode(A5, OUTPUT);// Set A5 as OUTPUT
pinMode(5, INPUT); // Use digital pin 5 as output port
}
// the loop function runs over and over again forever
void loop() {
int D2Sig = digitalRead(5);// read pin 5 signal
if (D2Sig == 1)
{
/* code */
digitalWrite(A5, HIGH); // atomize
delay(10000); // wait for 10 seconds
digitalWrite(A5, LOW); // atomization stopped
}
}
Here is my set up so far, I just confused with the code as I just want a push button to activate the atomiser...
Thaaaank you
