Skip to content

M2IO.Setpin_12VIO(1, OFF, SOURCE, PWM_OFF, PWM_Freq, PWM_Duty); #7

Description

@dme8a8

If Channel number was used for PWM, and then I want to do +12V. That won't work.

I've tried
M2IO.Setpin_12VIO(1, OFF, SOURCE, PWM_OFF, PWM_Freq, PWM_Duty);
delay(500);
M2IO.Setpin_12VIO(1, ON);

But the last one just turns on the PWM again.

One thing that I found out by trial and error is that if you do this to set a PWM:
PWM is set M2IO.Setpin_12VIO(1, ON, SOURCE, PWM_PIN, PWM_Freq, PWM_Duty);

And then this when you want +12V:
M2IO.Setpin_12VIO(1,OFF);
M2IO.Setpin_12VIO(1, OFF, SOURCE, PWM_OFF, PWM_Freq, PWM_Duty);
M2IO.Init_12VIO();
M2IO.Setpin_12VIO(1, ON);

It works, BUT all other channel setting will be erased. (If you're running a PWM on another channel)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions