guido-visser / vMix-M5Stick-Tally-Light

A script to run on a M5Stick-C to use the device as a Tally Light for vMix
74 stars 18 forks source link

NeoFlash Hat not working #11

Closed Dirwinc closed 4 years ago

Dirwinc commented 4 years ago

Hey Guido, I'm still troubleshooting the new v2 plugin code, but haven't gotten it to work yet with the neoflash (regular LCD screen is working fine). Here's a few things I've changed in the code so far:

Changed #define C_PLUS 0 (Note: Readme needs updated)

Uncommented #include "plugins/LED_HAT.h"; (Note: Readme needs updated)

Changed #define DATA_PIN 26

Changed #define NUM_LEDS 126

I reverted back to my old Fork code and the Neoflash is working with that source, so I'm fairly sure its not a device or hat issue. Any ideas?

Thanks, Dirwin

Dirwinc commented 4 years ago

I see now... I missed your Readme comment to Uncomment everything in k_PLUGINMANAGER.h. It works now :)

Dirwinc commented 4 years ago

Might be nice to put that in the Global settings in the future somehow (rather than uncommenting those lines)

guido-visser commented 4 years ago

Good point, the current solution is not really satisfactory. Thanks for the idea, I think I know which way to go now 😄

guido-visser commented 4 years ago

Was just thinking, when I change this, it will be a major version update, since the API changes and it breaks compatibility with version 2. So it will be version 3, just so you know.

Dirwinc commented 4 years ago

Yep, that seems fair to me.

btw, it'd be good to add an LED Hat "Clear" in the resetScreen() function somehow. You can probably do it in a more elegant way than I did :)

void resetScreen(){ cls(); digitalWrite(LED_BUILTIN, HIGH); M5.Lcd.setCursor(0, 0); M5.Lcd.fillScreen(TFT_BLACK); M5.Lcd.setTextSize(1); M5.Lcd.setTextColor(WHITE, BLACK); FastLED.clear(); // CLEAR NEOFLASH LED HAT IF THERE IS ONE FastLED.show(); }