Hello all ! ![]()
i got another question...
here´s a short version of my code :
...
int size1;
const int valve = 12;
...
void setup() {
pinMode(valve, OUTPUT);
Serial.begin(9600);
}
void loop() {
...
// here I´m reading stuff from the Serial port and convert it etc.
...
size1 = Data[1].toInt() ;
...
/////////////////////////////// ** I´ll describe this part
digitalWrite(valve, HIGH);
delay(size1);
digitalWrite(valve, LOW);
delay(100);
}
////////////////////////////// **
** Here is my Problem :
I´ve written a programm that lets me control falling water-drops through a GUI I made with Visual Basic. The Serial Reading, converting etc. works pretty good.
In the **-part , the final dropping does happen.
The valve opens as long as the value of the variable size1.Then the loop is over. In the second loop, i want the valve to drop again.
So the variable size1 should keep its value for the next loops. (Until i send another value).
But at the moment the valve just makes a drop whenever i press my Drop-Button in visual basic...
I hope you guys understand ![]()