Demo for FibonacciLFSR Class
Dependencies: mbed FibonacciLFSR
main.cpp
- Committer:
- electromotivated
- Date:
- 2022-01-29
- Revision:
- 0:db43daae7a78
File content as of revision 0:db43daae7a78:
#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);
}
}