everything from kitchen pc

Signed-off-by: Thomas Schmid <tom@binary-kitchen.de>
This commit is contained in:
Thomas 2022-06-27 23:09:29 +02:00
parent 68f4509843
commit 9f822ce258
10 changed files with 8 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

View File

@ -6,6 +6,7 @@
extern "C" extern "C"
{ {
#define BASE_DIR "C:/Users/Binarykitchen/Documents/tom/fusion-zauberstab/firmware/"
asm( asm(
".macro inc_sample name, filename\n\t" ".macro inc_sample name, filename\n\t"
".pushsection .rodata\n\t" ".pushsection .rodata\n\t"
@ -23,7 +24,8 @@ asm(
extern const unsigned int label##_size; \ extern const unsigned int label##_size; \
incbin(fusion_font, "C:/Users/Binarykitchen/Documents/tom/fusion-zauberstab/firmware/src/applications/fusion_font.bin")
incbin(fusion_font, BASE_DIR "assets/fairydust.bin")
} }
static CRGB get_pixel(unsigned int x, unsigned int y, unsigned int sx, const unsigned char *data) { static CRGB get_pixel(unsigned int x, unsigned int y, unsigned int sx, const unsigned char *data) {
@ -47,9 +49,10 @@ void ImageDisplayApp::deinit() {
void ImageDisplayApp::loop() { void ImageDisplayApp::loop() {
static unsigned int col = 0; static unsigned int col = 0;
unsigned int sx = fusion_font_size/(3*48);
for (int i = 0; i< NUM_LEDS; i++) { for (int i = 0; i< NUM_LEDS; i++) {
leds[i] = get_pixel(col, i, 218, fusion_font); leds[i] = get_pixel(col, i, sx, fusion_font);
} }
col++; col++;
col = col % 218; col = col % 218;

View File

@ -21,7 +21,7 @@ struct ImageDisplayApp image_display {};
std::vector<std::reference_wrapper<App>> apps = { std::vector<std::reference_wrapper<App>> apps = {
std::ref<App>(beat_detect_app), std::ref<App>(beat_detect_app),
std::ref<App>(fackel_app), std::ref<App>(fackel_app),
std::ref<App>(image_display), //std::ref<App>(image_display),
}; };
static unsigned int current_app = 0; static unsigned int current_app = 0;

View File

@ -34,8 +34,8 @@ int zauberstab_init()
} }
myAcc.setDataRate(ADXL345_DATA_RATE_200); myAcc.setDataRate(ADXL345_DATA_RATE_200);
myAcc.setRange(ADXL345_RANGE_8G); myAcc.setRange(ADXL345_RANGE_16G);
myAcc.setGeneralTapParameters(ADXL345_XY0, 3.0, 30, 100.0); myAcc.setGeneralTapParameters(ADXL345_XY0, 5.0, 50, 100.0);
myAcc.setAdditionalDoubleTapParameters(false, 250); myAcc.setAdditionalDoubleTapParameters(false, 250);
myAcc.setInterrupt(ADXL345_DOUBLE_TAP, INT_PIN_1); myAcc.setInterrupt(ADXL345_DOUBLE_TAP, INT_PIN_1);
attachInterrupt(digitalPinToInterrupt(4), double_tab_int, RISING); attachInterrupt(digitalPinToInterrupt(4), double_tab_int, RISING);

BIN
inventor/klaue.stl Normal file

Binary file not shown.

BIN
inventor/mutter-halter.stl Normal file

Binary file not shown.