Kamil Ondrousek / Mbed 2 deprecated Duffing
Revision:
0:714ffbdde11c
Child:
1:be9de147b3d1
diff -r 000000000000 -r 714ffbdde11c main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Dec 25 14:28:44 2010 +0000
@@ -0,0 +1,31 @@
+#include "TFT_4DGL.h"
+
+TFT_4DGL lcd(p9,p10,p11);
+
+int main() {
+   
+    float a = 2.75;
+    float b = 0.1;
+
+    float x = 0;
+    float y = 1;
+
+    int xout = 0;
+    int yout = 0;
+
+   lcd.baudrate(600000);
+ 
+ while (1) {
+ 
+    double oldX = x;
+  
+    x = y;
+    y = -b*oldX+a*y-pow(y,3);
+  
+    xout = 160+(x*80);
+    yout = 120+(y*60);
+   
+    lcd.pixel(yout,xout,WHITE);
+  
+}
+}
\ No newline at end of file