57 lines
1.2 KiB
Arduino
57 lines
1.2 KiB
Arduino
#include <Adafruit_NeoPixel.h>
|
|
#include <WiFi.h>
|
|
#include <WebServer.h>
|
|
#include <ArduinoJson.h>
|
|
#include "index.h"
|
|
#include "fonts.h"
|
|
#include "cursor.h"
|
|
#include "lowLevel.ino"
|
|
|
|
#ifdef __AVR__
|
|
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
|
|
#endif
|
|
|
|
#define PIN 12
|
|
|
|
#define PANEL_PIXEL_COUNT 16
|
|
#define PANEL_COUNT 3
|
|
#define NUMPIXELS PANEL_PIXEL_COUNT*PANEL_PIXEL_COUNT*PANEL_COUNT
|
|
#define TEXT_BUFFOR_SIZE 64
|
|
|
|
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
|
|
|
|
ScrollableTextData scrollableTexts[4] = {0};
|
|
unsigned char scrollableTextsCount = 0;
|
|
char rightTextBuffor[TEXT_BUFFOR_SIZE] = {0};
|
|
|
|
|
|
|
|
void writeSmallScrollabreTextInBuffor(char (*text)[TEXT_BUFFOR_SIZE + 1], pos_y = 0) {
|
|
for (unsigned char i = 0; i < TEXT_BUFFOR_SIZE; i++) {
|
|
if (text[i]) {
|
|
unsigned char text_iterator
|
|
while()
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
void setup() {
|
|
Serial.begin(115200);
|
|
|
|
pixels.begin();
|
|
pixels.clear();
|
|
|
|
drawCharacter(font7x5['P' - '!'], 7, 5, 0x00030100);
|
|
drawCharacter(font7x5['T' - '!'], 7, 5, 0x00030100);
|
|
drawCharacter(font7x5['I' - '!'], 7, 5, 0x00030100);
|
|
|
|
pixels.show();
|
|
start_server();
|
|
}
|
|
|
|
void loop() {
|
|
shiftGivenRectangle(0, 0, 19, 7, 1);
|
|
pixels.show();
|
|
handle_server();
|
|
} |