Xiao DAC

Can anybody tell me how to use the hardware DAC on pin D0 of the Seeedunio Xiao board. I have tried to use analogWrite() with out any success, probably because it didn't do any setup for the DAC or pin. Also I am not sure what the pin number is for D0, as based on pins D2, D3 etc it works out as pin 0 which is unlikely.

Regards Terry

With many cores, you would actually cite "D0", as in

analogWrite(D0, value);

Did you try that? Also did the core not come with an example sketch for the DAC?

Thanks for your quick response. If I used D0 I got a "not declared in this scope" error, however using A0 works fine.

Cheers Terry

I forgot to add that I also had to setup pinMode( A0, OUTPUT).

Terry