Quick Question Guys... Does this only work with the Arduino IDE or can I

Quick Question Guys… Does this only work with the Arduino IDE or can I use it with AtmelStudio 6? I am using ws2811 and seeing some issues. Do you think this library is a bit more stable? Thanks in advance!

I use AS6 without issue, but getting the compilation environment just right is a bit tricky. There are slight differences between the compiler versions underneath the AS6 and Ardunio IDEs that may kick up more problems if you are not familiar with the inner workings of the IDEs and the compilers that they use. There is a very good free add-in for AS6 that fully emulates the Arduino compilation and settings. So if then is enabled, there will be no real differences and so any compilation faults in the Arduino output will be repeated in AS6.

Basically AS6 has a better environment for much larger projects and cross sharing of sources, repositories and so on. Arduino is far better for the novice and FL is targeted to compile within this IDE.

More likely than the compiler environment giving you trouble, is that you have a power or signalling problem somewhere.

Then if that is ruled out, then coding errors, like stack overflows, memory corruption and so on within your program are most likely. Just because the compiler says there are no errors. This just means that there are no errors regarding the compilation and generation of output code. Don’t be fooled into thinking that there are no errors in your code!

The compiler only has limited checks that you have not or will not do something stupid in your code. After all, how would it know if you did not know what you were doing or really wanted to write that random data over all the variables in RAM?

GIGO -> Garbage in, Garbage Out. First law of programming.

Hi Adam,
I posted a reply earlier, guess I didn’t post it properly… Oh well, I just noticed that I didn’t post fully my issues. I am actually using the WS2811.h library from Alan Burlison which I think is awesome but I am running into an issue with using interrupts. I would like to feed the the atmega via a serial port which is interrupt driven. This library I believe is disabling the interrupts while displaying the leds and interfering with the serial connection. I guess my question is this library a bit more flexible? Also, the library from Alan doesn’t seem to be updated in a while so I am thinking this library would be more current. So can I use this library with hopefully better results. If you think this will work well can you also point me to the arduino compiler add in that I can play with.
Thanks again for all your thoughts and help!

Ed,

The much later branches of FastLED support having interrupts enabled during the LED output procedure. However, the amount of time available to service interrupts is limited.

As long as your don’t enable lots of different interrupt sources, like only enable the UART for serial, and don’t send long strings of characters, then you should be OK. But the time available is very much dependant on the numbers of LEDs and the type. Some are better than others.

FastLED works and is intended to work with the Arduino IDE version 1.0.x and I think it works with 1.5.x but I have not tried it. I also have it working fine with Atmel Studio 6, but the compiling and link switches are critical, or it won’t compile or it won’t work once down loaded. I suggest you get it working in the Arduino IDE until you are really confident to move it to AS6, as the Arduino IDE it should work right away with little trouble. Basically AS6 is the same compiler, but with a different and more configurable front end for you to program with compared with the Arduino one. So underneath they are essentially the same.

Also build and test your code bit by bit:

  1. Get basic LED patterns working;
  2. Get the odd serial character coming through and being processed by your code;
    And so on. If you find serial data is being lost, due to interrupts not getting enough time, or the patterns are not updating because the interrupts too long to process your serial data. Then you need to send less characters or space then out more. Don’t try to send entire patterns via serial, just odd little commands, like change pattern, change colour or brightness. Sequences of 2 or 3 serial characters now and again.

Hope this helps.

you could use a visual studio plugin called “visualmicro” - it still uses the arduino build environment and not the Atmel studio one