XxFriction
New member
Hello there,
I want to control a 12v DC water pump using an Arduino board and Vixen 3,
I have a Mosfet (IRFZ44N) that I tried to use for speed control in normal Arduino,
but now I want to do this from Vixen 3, can't figure out how to do it,
here is the code I used to control the DC pump speed:
I wonder if someone knows a way or could point me to how to adjust this code and enable controlling the pump from Vixen 3.
Thank you in advance.
I want to control a 12v DC water pump using an Arduino board and Vixen 3,
I have a Mosfet (IRFZ44N) that I tried to use for speed control in normal Arduino,
but now I want to do this from Vixen 3, can't figure out how to do it,
here is the code I used to control the DC pump speed:
Code:
int PWM_PIN = 6;
int pwmval = 0;
void setup() {
Serial.begin(9600);
pinMode(PWM_PIN,OUTPUT);
}
void loop() {
if (Serial.available() > 1) {
pwmval = Serial.parseInt();
Serial.print("Speed: ");
Serial.println(pwmval);
analogWrite(PWM_PIN, pwmval);
}
}
Thank you in advance.
Last edited: