One bitbanger to rule them all...
Or, in MicroPython, you could use the existing machine.bitstream:
https://docs.micropython.org/en/latest/library/machine.html#machine.bitstream
The Neopixel implementation is built on top of bitstream.
How does this
pt = pulsetrain.PulseTrain(board.GP0, 2_500_000) # each tick is 0.4 us
get from 2_500_000 to 0.4 usecs?
I must be missing something obvious.
2_500_000 is 2.5 MHz, or 0.4 us per cycle.
Or, in MicroPython, you could use the existing machine.bitstream:
https://docs.micropython.org/en/latest/library/machine.html#machine.bitstream
The Neopixel implementation is built on top of bitstream.
How does this
pt = pulsetrain.PulseTrain(board.GP0, 2_500_000) # each tick is 0.4 us
get from 2_500_000 to 0.4 usecs?
I must be missing something obvious.
2_500_000 is 2.5 MHz, or 0.4 us per cycle.