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
In the following code, program seems to enter an infinite loop (or does not throw any exception) after the Console.WriteLine ("Setting Period") statement :
var pwm = Device.CreatePwmPort(Device.Pins.D04, 1000, 0.5f, false);
pwm.Start();
// Measure : 1KHz, as expected
Console.WriteLine("Setting TimeScale");
pwm.TimeScale = TimeScale.Microseconds;
Console.WriteLine("Setting Period");
pwm.Period = 50.000f;
// The following line is never reached
Console.WriteLine($" - Period : {pwm.Period}");
If you remove the pwm.TimeScale statement or set the TimeScale to Seconds (and adjust the period , e.g. 0.05 seconds), period is set correctly, giving 20 Hz for the 0.05 period.
The text was updated successfully, but these errors were encountered:
In the following code, program seems to enter an infinite loop (or does not throw any exception) after the
Console.WriteLine ("Setting Period")
statement :If you remove the pwm.TimeScale statement or set the TimeScale to Seconds (and adjust the period , e.g. 0.05 seconds), period is set correctly, giving 20 Hz for the 0.05 period.
The text was updated successfully, but these errors were encountered: