Kamil Ondrousek / Mbed 2 deprecated Chaotic

Dependencies:   mbed

Committer:
JLS
Date:
Sat Jan 08 17:55:24 2011 +0000
Revision:
0:c6e56e9f3cdb

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JLS 0:c6e56e9f3cdb 1 #include "TFT_4DGL.h"
JLS 0:c6e56e9f3cdb 2
JLS 0:c6e56e9f3cdb 3 TFT_4DGL lcd(p9,p10,p11);
JLS 0:c6e56e9f3cdb 4
JLS 0:c6e56e9f3cdb 5 int main() {
JLS 0:c6e56e9f3cdb 6
JLS 0:c6e56e9f3cdb 7 float a = 3.7;
JLS 0:c6e56e9f3cdb 8
JLS 0:c6e56e9f3cdb 9 float x = 0.1;
JLS 0:c6e56e9f3cdb 10 float y = 0;
JLS 0:c6e56e9f3cdb 11
JLS 0:c6e56e9f3cdb 12 int xout = 0;
JLS 0:c6e56e9f3cdb 13 int yout = 0;
JLS 0:c6e56e9f3cdb 14
JLS 0:c6e56e9f3cdb 15 while (1) {
JLS 0:c6e56e9f3cdb 16
JLS 0:c6e56e9f3cdb 17 double oldX = x;
JLS 0:c6e56e9f3cdb 18
JLS 0:c6e56e9f3cdb 19 x = a*oldX*(1-oldX);
JLS 0:c6e56e9f3cdb 20 y++;
JLS 0:c6e56e9f3cdb 21
JLS 0:c6e56e9f3cdb 22 if (y>=640){
JLS 0:c6e56e9f3cdb 23
JLS 0:c6e56e9f3cdb 24 y = 0;
JLS 0:c6e56e9f3cdb 25 lcd.cls();
JLS 0:c6e56e9f3cdb 26
JLS 0:c6e56e9f3cdb 27 }
JLS 0:c6e56e9f3cdb 28
JLS 0:c6e56e9f3cdb 29 xout = -80+(x*340);
JLS 0:c6e56e9f3cdb 30 yout = (y/2);
JLS 0:c6e56e9f3cdb 31
JLS 0:c6e56e9f3cdb 32 lcd.pixel(xout,yout,WHITE);
JLS 0:c6e56e9f3cdb 33
JLS 0:c6e56e9f3cdb 34 }
JLS 0:c6e56e9f3cdb 35 }