I see that this question was raised about a year ago, and it went unanswered then. Being that the thread has been closed I'm forced to create a new one.
If I write zero (0.00) to all four analog channels as show below, #0,#1 and #3 all go to zero, but channel #2 goes high. (10.36v) on my meter. (Since the other pins work fine, I removed them from the code below.)
If I write anything other than zero it behaves as expected.
Is this a bug in the board, some counterintuitive but intentional behavior?
Is there a known way to write zero to analog output pin #2? It sure would be nice to be able to use this pin, but not being able to turn it off makes it essentially useless.
#include <Arduino_MachineControl.h>
using namespace machinecontrol;
void setup() {
analog_out.period_ms(2, 4);
}
void loop() {
analog_out.write(2, 0.00);
}