Init and setup the matrix. might have some other utility functions
This commit is contained in:
parent
caf2a89eec
commit
fda422524f
3 changed files with 33 additions and 1 deletions
|
@ -5,16 +5,19 @@
|
|||
This example code is in the public domain.
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#include "lua.hpp"
|
||||
#include "log.h"
|
||||
#include "matrix.h"
|
||||
|
||||
void setup() {
|
||||
// initialize the digital pin as an output.
|
||||
// Pin 13 has an LED connected on most Arduino boards:
|
||||
//pinMode(13, OUTPUT);
|
||||
LogOut.begin(9600);
|
||||
delay(10000);
|
||||
delay(10000); // TODO remove this
|
||||
|
||||
setup_matrix();
|
||||
l_init();
|
||||
}
|
||||
|
||||
|
|
16
teensy/matrix.cpp
Normal file
16
teensy/matrix.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "matrix.h"
|
||||
|
||||
// TODO this needs to setup the panel to actually be in the proper geometry
|
||||
RGBmatrixPanel matrixpanel(true);
|
||||
|
||||
void setup_matrix() {
|
||||
matrixpanel.begin();
|
||||
// Some defaults
|
||||
matrixpanel.setTextWrap(false);
|
||||
matrixpanel.setFont(&TomThumb);
|
||||
}
|
||||
|
||||
void loop_matrix() {
|
||||
// I think this might be best left to the lua code? or it'll run between frame draws in there.
|
||||
// matrix.swapBuffers(false);
|
||||
}
|
13
teensy/matrix.h
Normal file
13
teensy/matrix.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef __LUALIGHTS_LUA_ALLOC_H
|
||||
#define __LUALIGHTS_LUA_ALLOC_H
|
||||
|
||||
#include <Adafruit_GFX.h>
|
||||
#include <RGBmatrixPanel.h>
|
||||
#include <Fonts/TomThumb.h>
|
||||
|
||||
extern RGBmatrixPanel matrixpanel;
|
||||
|
||||
void setup_matrix();
|
||||
void loop_matrix();
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue