You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this error when initializing an object method that calls analogWrite. It causes my logic to be inverted so that 1 means off, and 0 means on. It only happens sometimes, so I can't simply change the logic.
Can you try performing a b.pinMode('P8_13', b.ANALOG_OUTPUT); ahead of making any b.analogWrite() attempts? Also, any chance you can try a 4.4.x kernel and 0.5.0-betaX BoneScript?
setting pinMode did not work consistently. Is it a synchronous function? At this time I cannot try newer versions because it's taken some time to make everything else compatible. I don't want to break other things.
From @cautiousCentaur on April 17, 2016 1:53
I have this error when initializing an object method that calls analogWrite. It causes my logic to be inverted so that 1 means off, and 0 means on. It only happens sometimes, so I can't simply change the logic.
self.Dim = function(amount){
bone.analogWrite(self.pin, (amount));
self.state = amount;
}
self.Dim(0.0);
Copied from original issue: jadonk#122
The text was updated successfully, but these errors were encountered: