Current test suit

This commit is contained in:
2026-05-16 18:51:12 +02:00
parent c9100ea957
commit b2762feb57
604 changed files with 101539 additions and 0 deletions
@@ -0,0 +1,107 @@
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_IS31FL3731.h>
// If you're using the full breakout...
Adafruit_IS31FL3731 matrix = Adafruit_IS31FL3731();
// If you're using the FeatherWing version
//Adafruit_IS31FL3731_Wing matrix = Adafruit_IS31FL3731_Wing();
static const uint8_t PROGMEM
smile_bmp[] =
{ 0b00111100,
0b01000010,
0b10100101,
0b10000001,
0b10100101,
0b10011001,
0b01000010,
0b00111100 },
neutral_bmp[] =
{ 0b00111100,
0b01000010,
0b10100101,
0b10000001,
0b10111101,
0b10000001,
0b01000010,
0b00111100 },
frown_bmp[] =
{ 0b00111100,
0b01000010,
0b10100101,
0b10000001,
0b10011001,
0b10100101,
0b01000010,
0b00111100 };
void setup() {
Serial.begin(9600);
Serial.println("ISSI manual animation test");
if (! matrix.begin()) {
Serial.println("IS31 not found");
while (1);
}
Serial.println("IS31 Found!");
}
void loop() {
matrix.setRotation(0);
matrix.clear();
matrix.drawBitmap(3, 0, smile_bmp, 8, 8, 255);
delay(500);
matrix.clear();
matrix.drawBitmap(3, 0, neutral_bmp, 8, 8, 64);
delay(500);
matrix.clear();
matrix.drawBitmap(3, 0, frown_bmp, 8, 8, 32);
delay(500);
matrix.clear();
matrix.drawPixel(0, 0, 255);
delay(500);
matrix.clear();
matrix.drawLine(0,0, matrix.width()-1, matrix.height()-1, 127);
delay(500);
matrix.clear();
matrix.drawRect(0,0, matrix.width(), matrix.height(), 255);
matrix.fillRect(2,2, matrix.width()-4, matrix.height()-4, 20);
delay(500);
matrix.clear();
matrix.drawCircle(8,4, 4, 64);
matrix.drawCircle(8,4, 2, 32);
delay(500);
matrix.setTextSize(1);
matrix.setTextWrap(false); // we dont want text to wrap so it scrolls nicely
matrix.setTextColor(100);
for (int8_t x=0; x>=-32; x--) {
matrix.clear();
matrix.setCursor(x,0);
matrix.print("Hello");
delay(100);
}
matrix.setTextSize(2);
matrix.setTextWrap(false); // we dont want text to wrap so it scrolls nicely
matrix.setTextColor(32);
matrix.setRotation(1);
for (int8_t x=7; x>=-64; x--) {
matrix.clear();
matrix.setCursor(x,0);
matrix.print("World");
delay(100);
}
}
@@ -0,0 +1,43 @@
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_IS31FL3731.h>
// If you're using the full breakout...
Adafruit_IS31FL3731 ledmatrix = Adafruit_IS31FL3731();
// If you're using the FeatherWing version
//Adafruit_IS31FL3731_Wing ledmatrix = Adafruit_IS31FL3731_Wing();
void setup() {
Serial.begin(9600);
Serial.println("ISSI manual animation test");
if (! ledmatrix.begin()) {
Serial.println("IS31 not found");
while (1);
}
Serial.println("IS31 Found!");
ledmatrix.setTextWrap(false);
ledmatrix.setTextColor(64); // quarter brightness
ledmatrix.setTextSize(1);
// fill all 8 frames with some text
for (uint8_t frame = 0; frame < 8; frame++) {
ledmatrix.setFrame(frame);
ledmatrix.clear();
ledmatrix.setCursor(0,0);
ledmatrix.write('a'+frame*3);
ledmatrix.write('b'+frame*3);
ledmatrix.write('c'+frame*3);
}
}
int x = 0;
void loop() {
// display each frame for 250 milliseconds
for (uint8_t frame = 0; frame < 8; frame++) {
ledmatrix.displayFrame(frame);
delay(250);
}
}
@@ -0,0 +1,32 @@
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_IS31FL3731.h>
// If you're using the full breakout...
Adafruit_IS31FL3731 ledmatrix = Adafruit_IS31FL3731();
// If you're using the FeatherWing version
//Adafruit_IS31FL3731_Wing ledmatrix = Adafruit_IS31FL3731_Wing();
// The lookup table to make the brightness changes be more visible
uint8_t sweep[] = {1, 2, 3, 4, 6, 8, 10, 15, 20, 30, 40, 60, 60, 40, 30, 20, 15, 10, 8, 6, 4, 3, 2, 1};
void setup() {
Serial.begin(9600);
Serial.println("ISSI swirl test");
if (! ledmatrix.begin()) {
Serial.println("IS31 not found");
while (1);
}
Serial.println("IS31 found!");
}
void loop() {
// animate over all the pixels, and set the brightness from the sweep table
for (uint8_t incr = 0; incr < 24; incr++)
for (uint8_t x = 0; x < 16; x++)
for (uint8_t y = 0; y < 9; y++)
ledmatrix.drawPixel(x, y, sweep[(x+y+incr)%24]);
delay(20);
}