Does anyone know how to use the AnalogOutput ports? I'd like to be able to output voltages between 0v-3.3v using these ports.
I'm stuck at trying to initialize the ports. That is:
private AnalogOutput analogOutput = new AnalogOutput(Cpu.AnalogOutputChannel.ANALOG_OUTPUT_0);
Compiles ok, but I get an Exception at runtime. Exception message has no useful information. I've tried the other constructor overloads as well (with various values), but no luck.
I'm guessing the analog outputs have 8bit resolution? Also, if anyone knows, I'm guessing I could simply write values from 0-255 to get output voltages from 0-3.3v. Is this correct?
- Brantsl likes this