Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "TFT_4DGL.h" 00002 00003 TFT_4DGL lcd(p9,p10,p11); 00004 00005 int x,y,rdx,rdy; 00006 00007 int n = WHITE; 00008 00009 AnalogIn sigx(p19); 00010 AnalogIn sigy(p20); 00011 00012 int main() { 00013 00014 while (1) 00015 00016 { 00017 00018 float rndx = 65535*sigx; 00019 float rndy = 65535*sigy; 00020 00021 rdx = int(rndx); 00022 rdy = int(rndy); 00023 00024 srand (rdy*rdx); 00025 00026 x = rand()%319; 00027 y = rand()%239; 00028 00029 if (x <= 319 and y <= 239) 00030 00031 { 00032 00033 lcd.pixel(y,x,n); 00034 00035 n = rand(); 00036 00037 } 00038 } 00039 }
Generated on Sat Jul 23 2022 03:37:51 by
1.7.2