Lixie Arduino library build problems


#21

@Legomaniac, seems the Lixie object constructor is what is causing the SOS. This will need a lot more digging.


#22

@peekay123 thanks for taking your time to look at this. Getting these Lixie displays working with the Photon would be so much more ideal than being stuck with my old Arduino Uno.

I took a look through the forum etiquette sticky and didn’t see anything prohibiting this, so I’m sorry if I’m out of line, but I would even go so far as to put a bounty on getting this library functional with the Photon. I would start at $50 but may increase it if need be.

I already have written a Particle App for a “smart clock” that I desperately want to switch from using .56" 7 segment LED displays to the Lixie displays. This is the last piece needed to turn my smart clock from a neat project into something very useful.

Thanks again for all your help with this issue!


#23

WOOHOOO!! I was able to get this to work!!

I don’t know how you figured it out @peekay123, but your hint that it was the Lixie object constructor was the key! THANK YOU SO MUCH!!!

I took a close look at the constructor, and noticed that the final line was this “build_controller(pin);”. I looked at that function, and found a bunch of pin assignment statements inside of an #ifdef AVR block:

I thought maybe that was some sort of architecture specific thing? Not entirely sure. Long story short is that I got rid of the if statement, preserved was was in the second part of it, and brought everything in an indent. My Lixie build_controller function now looks like this:

void Lixie::build_controller(const uint8_t pin){
    if (pin == 0)
		controller = &FastLED.addLeds<LED_TYPE, 0, COLOR_ORDER>(leds, NumLEDs);
    else if (pin == 2)
		controller = &FastLED.addLeds<LED_TYPE, 2, COLOR_ORDER>(leds, NumLEDs);
    else if (pin == 4)
		controller = &FastLED.addLeds<LED_TYPE, 4, COLOR_ORDER>(leds, NumLEDs);
    else if (pin == 5)
		controller = &FastLED.addLeds<LED_TYPE, 5, COLOR_ORDER>(leds, NumLEDs);
}

For those others that are looking to use Lixies with their Photon (@timauran I am lookin at you!), here are the modifications made:

  1. Lixie.cpp and Lixie.h - Comment out all references to max_power
  2. Lixie.cpp - Reduce the build_controller function to what I have shown above
  3. Lixie.h - Add “FASTLED_USING_NAMESPACE;” after “#include “FastLED.h””
  4. In FastLED - Comment out the “typedef volatile uint8_t RwReg” line in led_sysdefs_arm_stm32.h
  5. In FastLED - Adding “#include “Arduino.h”” to led_sysdefs_arm_stm32.h

Thanks again everyone for your help and especially @peekay123 it is greatly appreciated!!


#24

Awesome! That work is well beyond my pay grade.

Thanks to @Legomaniac and @peekay123 both for making this happen.

timauran