Demo for FibonacciLFSR Class

Dependencies:   mbed FibonacciLFSR

Files at this revision

API Documentation at this revision

Comitter:
electromotivated
Date:
Sat Jan 29 01:58:54 2022 +0000
Child:
1:df53b0ea87b1
Commit message:
Initial upload;

Changed in this revision

FibonacciLFSR.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FibonacciLFSR.lib	Sat Jan 29 01:58:54 2022 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/electromotivated/code/FibonacciLFSR/#a1207d543967
--- /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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jan 29 01:58:54 2022 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file