Is it possible to get this library to compile using AVR Studio? or only the Arduino software?
So e folks have compiled it with AVR stupid - part of the goal with the rewrite was to get it pulled away as much as possible from the arduino libraries.
I think the only arduino functions used are fallback pin-to-port mapping functions.
I haven’t yet gotten a copy of avr studio to try building yet, though.
AVR Stupid … classic.
This is why I shouldn’t respond to posts on the phone - autocorrect thinks it knows better
Thanks, I got everything working with my ws2811. But am now stuck with the coding. I am making a pov LED poi kind of similar to yours i think Ashley. I am trying to read an array of rgb colors to the LED strip but when I upload the program it just sits there and no lights turn on. Here is my code:
The program compiles and uploads fine but no lights… It only seems to not work because the values of iCol and iRow change in the line:
CRGB((a[iCol][iRow][0]), (a[iCol][iRow][1]), (a[iCol][iRow][2]));
In my attempts to troubleshoot I found that the following approach works as desired but it is not the way that i want to write the code (it would be super long…) :
int x1 = 0;
int x2 = 0;
r = a[x2][x1][0];
g = a[x2][x1][1];
b = a[x2][x1][2];
leds[0] = CRGB(g, r, b);
r = a[x2][1][0];
g = a[x2][1][1];
b = a[x2][1][2];
leds[1] = CRGB(g, r, b);
r = a[x2][2][0];
g = a[x2][2][1];
b = a[x2][2][2];
leds[2] = CRGB(g, r, b);
...etc
Any ideas what I am doing wrong?
Rather than passing the colors one by one to the array, try passing the entire column to the “leds” array. In my case, I’m reading the data in from a file. My setup has 48 pixels so that 144 color values (48 x 3). When I do the file read, it gets passed directly to the “leds” array. The image is 48 rows tall already, so I don’t need to do anything with the rows, all I need are columns:
for (int tmpCols = 0; tmpCols < imgColumns; tmpCols++) {
myFile.read((char*)leds, NUM_LEDS * 3);
LEDS.show();
_delay_us(imgSpeed);
}
So file.read() will read in 144 values from the file and stuff them in the “leds” array.
I’m sorry to bring this up again:
I’m trying to use FastSPI RC4 in a Atmel Studio 6 8-bit C++ project, but it fails to compile.
First error I get is “expected ‘;’, ‘,’ or ‘)’ before ‘&’ token (…)\lib8tion.h line 518 col 50” which refers to the ‘&’ in “LIB8STATIC void nscale8_LEAVING_R1_DIRTY( uint8_t& i, fract8 scale)”
I’ve only added "#include “FastSPI_LED2.h” " to my project yet.
What am I doing wrong?
Any advice on this topic or a short manual on how to set it up in Studio would be greatly appreciated!
Thanks in advance!
The problem is - I don’t even have a copy of studio yet - and this version, while written with an eye towards running in studio, does not officially support using atmel studio just yet. Once I get atmel studio up and running here (after this release is out the door and I finish my next two LED projects for halloween), then i’ll take a swing at bringing it up in atmel and writing up notes/docs on it.
At the moment, it sounds like there are some type definitions that are missing for you though, e.g. namely the uint8_t (unsigned char). There may be other includes that are needed for this to happen. (One ‘problem’ with the arduino environment is that there’s a bunch of silent includes that it does for you, you know, to be helpful
The typedef should be included, I think it’s somehow connected to the compiler used. As references (&) are not available in C, I believe that Studio tries to compile the .h as C instead of C++. Adding “-x c++ lib8tion.h” or renaming it to .hpp doesn’t impress Studio though…
Maybe someone who managed to use it with Studio can comment on this in the meantime.
Thanks again for the great work!