Kamil Ondrousek / Mbed 2 deprecated Chaotic

Dependencies:   mbed

main.cpp

Committer:
JLS
Date:
2011-01-08
Revision:
0:c6e56e9f3cdb

File content as of revision 0:c6e56e9f3cdb:

#include "TFT_4DGL.h"

TFT_4DGL lcd(p9,p10,p11);

int main() {
   
    float a = 3.7;

    float x = 0.1;
    float y = 0;

    int xout = 0;
    int yout = 0;
 
 while (1) {
 
    double oldX = x;
  
    x = a*oldX*(1-oldX);
    y++;
    
    if (y>=640){
    
    y = 0;
    lcd.cls();
    
    }
  
    xout = -80+(x*340);
    yout = (y/2);
   
    lcd.pixel(xout,yout,WHITE);
  
}
}