Demo for FibonacciLFSR Class
Dependencies: mbed FibonacciLFSR
Diff: main.cpp
- Revision:
- 0:db43daae7a78
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Jan 29 01:58:54 2022 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" +#include "FibonacciLFSR.h" +#include <bitset> +#include <iostream> + +Serial pc(USBTX, USBRX); +FibonacciLFSR myLFSR(FibonacciLFSR::LFSR_4); + +// Led order is mixed up to increase "random effect" at output +BusOut myleds(LED2, LED4, LED3, LED1); // See also "PortOut" + +int main() { + while(1){ + myleds = myLFSR.getRandom(); + wait(0.08); + } +}