Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
So the little clock project using the vintage sweep scale meter is just about completed. A small but satisfying little project.
I did notice that the needle has a little bit of sticktion when trying to increment by small values. i.e. if I up the PWM by 1, then nothing may happen for 3 steps and then the needle lurches. I tried to get round this by decreasing the pwm frequency for the move to sort of rattle the needle into place, then switch to fast pwm to stabilise it. what I appeared to get with the following code was just constant FSD.
One idea would be to add a short pulse larger and the same direction (up or down) than the small increment you actually want. You could do this for example if the increment is smaller than 3, then make it 6 and then immediately back to the actual value. The needle may not even show it is happening if the bigger pulse is fast enough.
On 10/16/2013 10:00 AM, ZBasic wrote:
So the little clock project using the vintage sweep scale meter is just about completed. A small but satisfying little project.
I did notice that the needle has a little bit of sticktion when trying to increment by small values. i.e. if I up the PWM by 1, then nothing may happen for 3 steps and then the needle lurches. I tried to get round this by decreasing the pwm frequency for the move to sort of rattle the needle into place, then switch to fast pwm to stabilise it. what I appeared to get with the following code was just constant FSD.
FFMan wrote:just wondered why the pwm code didn't appear to yield the expected result.
I suspect it is because the delay isn't long enough to have much of an effect. You might try something more on the order of tens of cycles to see if there is a different result.