first commit

This commit is contained in:
tiijay
2025-11-03 15:05:22 +01:00
commit 941c168de8
24 changed files with 728 additions and 0 deletions

80
src/main.cpp Normal file
View File

@@ -0,0 +1,80 @@
#include <FastLED.h>
#include <MyClass.h>
#include <BlinkInternLed.h>
#include <LedMatrix.h>
#include <font_5x7.h>
LedMatrix matrix;
void printCharMatrixSimple(char c)
{
const uint8_t *fontData = getFontChar(c);
Serial.println();
Serial.print("'");
Serial.print(c);
Serial.println("':");
String mtrx = "";
for (int row = 0; row < 7; row++)
{
uint8_t line = fontData[row];
for (int col = 0; col < 5; col++)
{
if (line & (1 << (4 - col)))
{
mtrx += "";
Serial.print("#"); // Einfaches # für Pixel
}
else
{
mtrx += ".";
Serial.print("."); // Punkt für leere Pixel
}
}
mtrx += "\n\r";
Serial.println();
}
Serial.println(mtrx);
}
void playWithBlinkLed()
{
BlinkInternLed internLed = BlinkInternLed();
String led_status = internLed.ledStatus();
Serial.println("PinStatus: " + led_status);
internLed.on();
delay(200);
led_status = internLed.ledStatus();
Serial.println("PinStatus: " + led_status);
internLed.off();
delay(200);
led_status = internLed.ledStatus();
Serial.println("PinStatus: " + led_status);
}
void setup()
{
matrix.setBrightness(255);
matrix.clear();
matrix.show();
// Draw static "HELLO WORLD"
matrix.drawText(1, 1, "Hello", CRGB::Red);
matrix.drawText(35, 1, "World", CRGB::Blue);
matrix.drawText(1, 20, "<°|`¶>", CRGB::Yellow);
matrix.drawText(1, 30, "Bottom", CRGB::Yellow);
matrix.show();
// printCharMatrixSimple('S');
// playWithBlinkLed();
}
void loop()
{
delay(1000);
}