I have seen the issue with pinMode(DAC1, 4095) before each analogWrite and I have included this in some simple code
but do not measure any voltage output on DAC1. Does there need to be an external resistor (1k) to Gnd
Just to make sure, when you’re using DAC1 you do measure on the pin that’s labled DAC (and not A3 which would be DAC2)?
Just try - as mentioned above - this
pinMode(DAC1, OUTPUT); // make sure to do it over and over again
There is an open issue about a regression in analogWrite()
When you use (or I guess used) Tinker this was still running on a previous system version and with a recent flash you got an auto-update causing these troubles.
You might have to downgrade or wait for the fix to be released.
Thanks, this worked for me. I could install my firmware with build target 0.4.5 via build.particle.io. Is there a possibility to set the build target in particle dev as well? It looks like it’s auto updating my device again once I try to flash via the Dev IDE.
I don’t think there is a way to set the target system version in Particle Dev, but I also think that Particle Dev does not cause an auto-update either, which might result in your application firmware not being able to run on your device if it’s not updated.
This is a muddle which I usually circumvent either by building locally or using Web IDE (Particle Build).
But maybe @suda got more background on that for you
The ide won’t update the firmware. Just click on devices icon (2nd from the bottom on the left), select your photon and in the details, select against which firmware you compile the code (0.4.5 instead of Latest).