Lixie driver library import

Importing libraries looks a little more complicated than I’m used to (having never imported a library), and I was wondering if someone would be able to import an arduino library that’s on Github for me. The library is here:

My apologies if I’m asking for something that’s time consuming or actually easy…

Tim

1 Like

Let me ping someone that might be able to help, @rickkas7 or @ParticleD are you able to assist?

@KyleG I’ll try and port it over the next few days :grinning:

1 Like

Thank you for your help!

Was this ever imported?

No it was not. I could not reproduce the fix that was posted, and have just continued to use my Arduino code.

aghh okay, have just been frustrated with all the hoops I’ve had to jump through to get this working including downloading the IDE and having to custom name the lixie library because apparently I can’t use a library name even if it isn’t publicly taken

This may have slipped through the cracks on @peekay123’s side :wink:

The Lixie library makes use of the FastLED library which has not been updated for Particle devices in a long time. The last FastLED port relied on the STM32 built-in configurations which don’t take into account the HAL environment of the Particle devices. So, for Lixie to port, FastLED needs an updated port. I just haven’t had time to get to it.

1 Like

I noticed that there were two FastLED libraries, the original and FastLED2. I assumed 2 was the newly ported over version. Any chance you’d be able to port over FastLED to photon anytime soon? I’d offer to do it but am unfamiliar with C++ and the Arduino environments and would need some direction

I have the Lixie library compiling with the FastLED2 library using the CLI and targeting the Photon. Now I need to post it as a library on the IDE and see if I can get that working.

Just to be clear, it compiles but I can’t actually test it since I don’t have Lixie devices.

2 Likes

Awesome! That sounds amazing! I’ll check this thread every few hours, but ping me once you get something working and I’d be happy to test it out immediately.

@Blackglade, I have just finished posting the Lixie library and examples to the Web IDE. Look for the “Lixie-Particle” library. Let me know if it works!

1 Like

I just tested it out running some sample code and didn’t seem to work properly and the device went to SOS and gave me a hard fault. I now can’t seem to get out of it and properly reset it.

Anytime I connect it to my computer, and try to fix it via Particle-CLI, I get a no DFU device found even when it’s in Safe/DFU mode… Anyway in the meantime while I try to factory reset my particle device (I made the mistake of deleting it from my account before properly resetting), I wasn’t sure which libraries you updated but I tried to compile my sample code with both FastLED and FastLED2 using Lixie-Particle.

FastLED gave me an error with the following line: previous declaration as 'typedef volatile uint8_t RwReg' This janky fix for this I believe was described here: Lixie Arduino library build problems (2nd to last comment)

FastLED 2 just gave me the SOS Hard Fault.

Once I can get my Photon properly reset, I’ll try running a simple command and see what happens…

@peekay123

Just tested this with some simple code setting the color of a digit and I’m getting a hard fault with FastLED2. For reference my device is using 1.1.0, FastLED 5.1.8 and the latest Lixie library 1.4.0

@Blackglade, that’s a bummer. How are you running FastLED 5.1.8 given the latest version is 3.2? This will need more debugging obviously.

@peekay123 so I was using the FastLED2 library available on the Web IDE libraries page:

Capture

Is there anything I can do in terms of dumping the firmware or something so you can get more information on what is causing the fault?

Edit: Whoops I mean’t to say 3.1.8. Not 5.1.8

@Blackglade, I created a project in Workbench and copied all the files over. I’ll need to create a debug version and run it on a Photon with the (older) Particle debugger board to get some insights. This may take a some time to setup.

@peekay123 Alright, please ping me if there anything I can do to help

@Blackglade, I tested the FastLED2 library separately and it works fine. I’ll be testing the Lixie stuff next.

UPDATE: Found the problem! In the Lixie library function build_controller(pin) there was only a test for __AVR__ and ESP8266 devices. This meant the necessary controller object wasn’t being built properly. So I added a section for PARTICLE with correct pin mapping for D0-D7, A0-A5 and voila! I ran the Lixie FPS example on a string of 8 neopixels, which is not enough to emulate a full Lixie unit I believe but it did demonstrate activity and the serial console shows an FPS of 1356. I will post a new version of the library so you can test.

2 Likes