You can connect via the serial monitor and send ‘?’ to get a list of
commands available. This allows some diagnostics when the board isn’t
working with the OLS client.
Sending ‘4’ does a 4MHz capture and ‘2’ dumbs the data buffer for
example. Recommended to use this with the simulated signal via a
timer. See the bottom of the setup() function and change the ‘#if 0’
to ‘#if 1’ to enable it.
Also, fix a long standing bug that broke 2MHz captures and the
ATmega168. (improper #if defined check)
Fixes issue #14 where I copied the preprocessor logic from a different
Mega related check and didn't fix up the elif. So samples from 512 -
1023 were always zero on the Mega.
Update to v0.12
Use unrolled loops to sample at 2MHz & 4MHz rates. Based on some
testing by Bob Davis (http://bobdavis321.blogspot.com)
The maximum with a 16MHz clock is 5.3333MHz (3 cycles per sample) but
sampling at that rate isn't very accurate. Accuracy is pretty good at
2MHz & 4MHz.