A known bug in the breakout_digital_device hdl module version 2 requires that 2 ticks need to be subtracted from periodTicks before it is written to the DigitalIO.SAMPLE_PERIOD register on this line:
|
device.WriteRegister(DigitalIO.SAMPLE_PERIOD, periodTicks); |
in order for the true sample rate to match the value supplied in the SampleRate property.