├── README.md
├── Htmlpages.zip
├── library.properties
├── library.json
├── ledtable.ino
├── example.ino
├── convert.java
├── tetris.html
├── paint.txt
├── paint.h
├── paint.html
├── images.h
├── ledTable.h
└── tetris.h
/README.md:
--------------------------------------------------------------------------------
1 | # ledtable
2 | Program for ledtable with esp8266
3 |
--------------------------------------------------------------------------------
/Htmlpages.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hpwit/ledtable/HEAD/Htmlpages.zip
--------------------------------------------------------------------------------
/library.properties:
--------------------------------------------------------------------------------
1 | name=LEDtable
2 | version=0.9
3 | author=Yves BAZIN
4 | maintainer=Yves BAIZN
5 | sentence=Function for ledtable.
6 | paragraph=Function for ledtable.
7 | category=Display
8 | url=
9 | architectures=*
10 |
--------------------------------------------------------------------------------
/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "LEDTable",
3 | "description": "To manage the lad table",
4 | "keywords": "led,noise,rgb,math,fast",
5 | "authors": [
6 | {
7 | "name": "Yves BAZIN",
8 | "url": "",
9 | "maintainer": true
10 | }
11 | ],
12 | "repository": {
13 |
14 | },
15 | "version": "1.0",
16 | "license": "MIT",
17 | ,
18 | "frameworks": "arduino",
19 | "platforms": "*",
20 | "examples": [
21 | "examples/*.ino"
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/ledtable.ino:
--------------------------------------------------------------------------------
1 | #include "ledTable.h"
2 | #include "tetris.h"
3 |
4 | int k = 0;
5 |
6 | void setup() {
7 | // system_update_cpu_freq(SYS_CPU_160MHZ);
8 | Serial.begin(115200);
9 | delay(100);
10 | Serial.setDebugOutput(true);
11 |
12 | Serial.println("Setup");
13 |
14 | if (initTable(30, 20)) //size of your led grid (wide*height)
15 | {
16 | FastLED.setBrightness(32);
17 | fill(bgColor);
18 | Serial.println("Fill");
19 |
20 | FastLED.show();
21 |
22 | tableOrientation = DOWN_RIGHT_INV; //used if i want ta change table orientation )
23 |
24 | }
25 | initTetris(10, 20);
26 | initTetrisScoketControl();
27 | }
28 |
29 | void loop() {
30 | tetrisWebSocket.loop();
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/example.ino:
--------------------------------------------------------------------------------
1 | #include "ledTable.h"
2 | #include "images.h"
3 | #include "yves_image.h"
4 |
5 | int k=0;
6 |
7 | void setup() {
8 | system_update_cpu_freq(SYS_CPU_160MHZ);
9 | Serial.begin(115200);
10 | delay(100);
11 | Serial.setDebugOutput(true);
12 |
13 |
14 | calculghosts(bgColor) ;
15 | calculfraise(bgColor);
16 | calculpic(cerise, palec, bgColor, 14, 14,cerisecalc);
17 | calculpic(mario, palm, bgColor, 14, 17,mariocalc);
18 | calculpic(mario, pall, bgColor, 14, 17,luigicalc);
19 |
20 | if(initTable(30,20)) //size of your led grid (wide*height)
21 | {
22 | FastLED.setBrightness(32);
23 | fill(bgColor);
24 |
25 |
26 | FastLED.show();
27 |
28 |
29 | tableOrientation=DOWN_RIGHT_INV; //used if i want ta change table orientation )
30 |
31 |
32 | }
33 | }
34 |
35 |
36 | void loop() {
37 | int offset=-20;;
38 | int YO=0;
39 | if(isTable)
40 | {
41 |
42 |
43 |
44 |
45 | k = (k+1) % 300;
46 |
47 |
48 | fill(bgColor);
49 |
50 | displaypic(cerisecalc,k +offset, YO, 14, 14);
51 |
52 | displaypic(fraiseCalc, k + offset - 14 , YO + 2, 11, 10);
53 | displaypic(ghostred, k + offset - 30, YO, 14, 14);
54 | displaypic(ghostyellow, k + offset - 46, YO, 14, 14);
55 | displaypic(ghostgreen, k + offset - 62, YO, 14, 14);
56 | displaypic(ghostPurple, k + offset - 78, YO, 14, 14);
57 | displaypic(ghostCyan, k + offset - 94, YO, 14, 14);
58 | displaypic(mariocalc, k + offset-110 , YO, 14, 17);
59 | displaypic(luigicalc, k + offset-127 , YO, 14, 17);
60 | displayBitmap(mickey, k + offset-127-15,YO,30,32);
61 | displayBitmap(champi, k + offset-127-15-17,YO+3,16,16);
62 | FastLED.show();
63 | FastLED.delay((int)(1000 / 100));
64 |
65 |
66 |
67 | }
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/convert.java:
--------------------------------------------------------------------------------
1 | import java.io.*;
2 |
3 |
4 | public class Main {
5 |
6 | public static void main(String[] args) {
7 | File file = new File("/Users/yvesbazin/Downloads/add.bmp");
8 | byte[] fileData = new byte[(int) file.length()];
9 | try {
10 | DataInputStream dis = new DataInputStream(new FileInputStream(file));
11 | dis.readFully(fileData);
12 | dis.close();
13 | // System.out.println("here");
14 | for (int i=0;i
2 |
3 | Tetris
4 |
5 |
17 |
18 |
19 | Tetris
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
84 |
85 |