mirror of
https://github.com/alopexc0de/pixopixel.git
synced 2024-12-25 14:32:40 +00:00
put the functions into a library, also gonna work on fancy wifi stuff
This commit is contained in:
parent
b9e9e11ff4
commit
9a8c65abe8
32
FIRMWARE/wifi-startup/wifi-startup.ino
Normal file
32
FIRMWARE/wifi-startup/wifi-startup.ino
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#include <SPI.h>
|
||||||
|
#include <Adafruit_GFX.h>
|
||||||
|
#include <Adafruit_DotStarMatrix.h>
|
||||||
|
#include <Adafruit_DotStar.h>
|
||||||
|
#include <ArduinoJson.h>
|
||||||
|
#include "pixols.h"
|
||||||
|
#include "pixo-displaylib.h"
|
||||||
|
|
||||||
|
#define DATAPIN 19
|
||||||
|
#define CLOCKPIN 18
|
||||||
|
#define SHIFTDELAY 30
|
||||||
|
#define BRIGHTNESS 15
|
||||||
|
#define MAX_FPS 45
|
||||||
|
|
||||||
|
Adafruit_DotStarMatrix matrix = Adafruit_DotStarMatrix(
|
||||||
|
16, 16, DATAPIN, CLOCKPIN,
|
||||||
|
DS_MATRIX_TOP + DS_MATRIX_LEFT +
|
||||||
|
DS_MATRIX_ROWS + DS_MATRIX_PROGRESSIVE,
|
||||||
|
DOTSTAR_BGR);
|
||||||
|
|
||||||
|
void setup(void) {
|
||||||
|
matrix.begin();
|
||||||
|
matrix.setBrightness(BRIGHTNESS);
|
||||||
|
|
||||||
|
scanChangePxl(darkness, sh, 1000, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
uint32_t t;
|
||||||
|
while (((t = micros()) - prevTime) < (1000000L / MAX_FPS)); // FPS Limit?
|
||||||
|
prevTime = t;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user