This demos testing a pixels colour. If the next pixel is not black the falling pixels reset to top of the screen. The text and graphics are not erased. https://youtu.be/830z7IZIEK8
#chip mega328p, 16#option explicit#include<glcd.h>#include<UNO_mega328p.h >;#define GLCD_TYPE GLCD_TYPE_ILI9341#define ILI9341_HardwareSPI;#define GLCD_DC DIGITAL_8 ' Data command line#define GLCD_CS DIGITAL_10 ' Chip select line#define GLCD_RESET DIGITAL_9 ' Reset line#define GLCD_DI DIGITAL_12 ' Data in | MISO#define GLCD_DO DIGITAL_11 ' Data out | MOSI#define GLCD_SCK DIGITAL_13 ' Clock Line;#define black 2147483648#define red 2163998720#define green 2147548160#define blue 2147483900#define white 2164063484#define purple 2163482876#define yellow 2164063232#define cyan 2147548412#define d_gray 2152747088#define l_gray 2155360444#define silver 2160378052#define maroon 2156134400#define olive 2156167168#define lime 2147548160#define aqua 2147548412#define teal 2147516548#define navy 2147483780#define fuchia 2163998972;#define GLCD_EXTENDEDFONTSET1GLCDfntDefaultsize=2GLCDBackground=ILI9341_BLACKGLCDRotate(Portrait_Rev)GLCDCLSILI9341_BLACK;dimpixcolaslongdimpx,pyasworddimsx(20),sy(20),tmpasword;line0,319,239,319,ILI9341_greenFilledBox91,280,151,318,ILI9341_blueFilledTriangle80,279,120,250,160,279,ILI9341_REDFilledBox128,302,140,318,ILI9341_REDFilledBox100,300,120,312,ILI9341_YELLOWGLCDPrint0,120,"P I X E L T E S T",ILI9341_blue;fortmp=1to20;snowsx(tmp)=randomifsx(tmp)>239thensx(tmp)=237sy(tmp)=randompsetsx(tmp),sy(tmp),ILI9341_WHITEnexttmp;mainloopdofortmp=1to20;fallingsnowpset(sx(tmp),sy(tmp),GLCDBackground)sy(tmp)=sy(tmp)+1pixcol=ReadPixel_ILI9341(sx(tmp),sy(tmp))ifpixcol<>blackthensy(tmp)=0:sx(tmp)=randomifsx(tmp)>239thensx(tmp)=237endifpset(sx(tmp),sy(tmp),ILI9341_WHITE)nexttmploop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
GCB changes daily. Is there a demo for this already? You only changed the include recently.
Is the way I defined colours wrong? I couldn't change the long pixel colour to gcb word colour. Spent too long trying.
I'm glad you added the function.
Add a snowman :)
or santa moving round and the house shoots missiles....not
Just gave an idea for a game. snow looks like "star field effect" , just need pixels moving at different speeds. Bored if I posted results? I could do a 4 way move. ie press l,r,u,d and the pixels move opposite direction. with pixels moving at differrent speed it looks very 3D like star trek flying through space.
What's this got to do with pics you ask.
Last edit: stan cartwright 2017-11-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This demos testing a pixels colour. If the next pixel is not black the falling pixels reset to top of the screen. The text and graphics are not erased.
https://youtu.be/830z7IZIEK8
@Stan You telling us? Sharing succss?
GCB changes daily. Is there a demo for this already? You only changed the include recently.
Is the way I defined colours wrong? I couldn't change the long pixel colour to gcb word colour. Spent too long trying.
I'm glad you added the function.
Add a snowman :)
or santa moving round and the house shoots missiles....not
Just gave an idea for a game. snow looks like "star field effect" , just need pixels moving at different speeds. Bored if I posted results? I could do a 4 way move. ie press l,r,u,d and the pixels move opposite direction. with pixels moving at differrent speed it looks very 3D like star trek flying through space.
What's this got to do with pics you ask.
Last edit: stan cartwright 2017-11-30
Minimise the code. I am not wanting to figure out from the posting the minimum code to repoduce the issue.
Change shows that this glcd has not changed, so, minimise the code and post that.
If this stuff was easy. There would be no challenges. This is probably an error somewhere. The trick is to find the root cause.
No issue, just a demo. Why read a pixel. dunno, but you can now. dim prob