You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "We love the movie Matrix. Feel the Digital Rain Animation effect in the movie. You can make the matrix effect on your display easily.",
DigitalRainAnim.cpp - Library for Digital Rain Animation for TFT_eSPI.
3
+
Created by Eric Nam, December 30, 2020.
4
+
Released into the public domain.
5
+
*/
6
+
7
+
#include"DigitalRainAnim.h"
8
+
9
+
DigitalRainAnim::DigitalRainAnim(){}
10
+
11
+
//initialze with only tft
12
+
voidDigitalRainAnim::init(TFT_eSPI* tft){
13
+
14
+
tft_DigitalRainAnim = tft;
15
+
line_len_min = 3;
16
+
line_len_max = 20;
17
+
line_speed_min = 3;
18
+
line_speed_max = 15;
19
+
timeFrame = 100;
20
+
21
+
this->prepareAnim();
22
+
}
23
+
24
+
//initialze with only tft and params
25
+
voidDigitalRainAnim::init(TFT_eSPI* tft, int new_line_len_min, int new_line_len_max, int new_line_speed_min, int new_line_speed_max, int new_timeFrame)
26
+
{
27
+
tft_DigitalRainAnim = tft;
28
+
line_len_min = new_line_len_min;
29
+
line_len_max = new_line_len_max;
30
+
line_speed_min = new_line_speed_min;
31
+
line_speed_max = new_line_speed_max;
32
+
timeFrame = new_timeFrame;
33
+
34
+
this->prepareAnim();
35
+
}
36
+
37
+
//checking how many lines it can draw from the width of the screen.
38
+
//the size of the array is determined by the number of lines.
DigitalRainAnim.h - Library for Digital Rain Animation for TFT_eSPI.
3
+
Created by Eric Nam, December 30, 2020.
4
+
Released into the public domain.
5
+
*/
6
+
7
+
#ifndef DigitalRainAnim_h
8
+
#defineDigitalRainAnim_h
9
+
10
+
#include<TFT_eSPI.h>
11
+
#include<SPI.h>
12
+
13
+
#defineFONT_SIZE2//set font size 2
14
+
#defineLINE_WIDTH10//width for font size 2
15
+
#defineLETTER_HEIGHT14//height for font size 2
16
+
17
+
classDigitalRainAnim
18
+
{
19
+
public:
20
+
DigitalRainAnim();
21
+
voidinit(TFT_eSPI* tft); //initialization
22
+
voidinit(TFT_eSPI* tft, int new_line_len_min, int new_line_len_max, int new_line_speed_min, int new_line_speed_max, int new_timeFrame); //initialization with parameters
0 commit comments