247
edits
No edit summary |
|||
Line 41: | Line 41: | ||
60; i < | 60; i < | ||
255; i++) { | 255; i++) { | ||
analogWrite(pump_in, i); // turn on the pump_in pin with value "i" | analogWrite(pump_in, i); // turn on the pump_in pin with value "i" | ||
delay(50); // wait for 50 milliseconds | delay(50); // wait for 50 milliseconds | ||
//Serial.println(i); // print the value of i | //Serial.println(i); // print the value of i | ||
} | } | ||
analogWrite(pump_in, | analogWrite(pump_in, | ||
0); // turn off the pump | 0); // turn off the pump | ||
// delay: wait for some time | // delay: wait for some time | ||
delay(1000); // wait for one second | delay(1000); // wait for one second | ||
// enter an eternal loop for prototyping | // enter an eternal loop for prototyping | ||
// here will be a for loop for sucking out the air again | // here will be a for loop for sucking out the air again | ||
// while (1) {} | // while (1) {} | ||
analogWrite(pump_in, | analogWrite(pump_in, | ||
0); // turn off the pump | 0); // turn off the pump | ||
// make a for loop in order top blow up the balloon while ramping the motor | // make a for loop in order top blow up the balloon while ramping the motor | ||
for (int i = | for (int i = | ||
255; i > | 255; i > | ||
60; i--) { | 60; i--) { | ||
edits