Adafruit QT Py and NeoPixel strip with Arduino IDE

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
LEDLIT1
 
Posts: 115
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by LEDLIT1 »

Hi Adafruit2,

are you installing the library manually?
Re: No.

check https://learn.adafruit.com/adafruit-all ... nstall-use to see how to install the library manually to get the absolute latest version
Re: Okay. I downloaded FastLED-master.zip. Unzipped it. Installed it manually. SUCCESS!!!

Thank you Adafruit2 and thank you Dave for helping me through this initial QtPy experience.

Lou

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by adafruit2 »

yay! we asked fastled to do a formal release, they say this week they will try!

User avatar
LEDLIT1
 
Posts: 115
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by LEDLIT1 »

Hi adafruit2 and Dave,

New issue when I continued. Error code says EEPROM.h: No such file or directory. Do I need to a different library to use EEPROM with Qt Py?
Should we start a new thread or continue here?

Thank you,
Lou

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by adafruit2 »

there is no eeprom on the device available

User avatar
LEDLIT1
 
Posts: 115
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by LEDLIT1 »

Hi adafruit2,

Would using the GD25Q16 - 2MB SPI Flash in 8-Pin SOIC package on the back of the Qt Py be similar to using EEPROM?

Thank you,
Lou

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by adafruit2 »

kinda? it isnt plug and play the same, you would use SPIFlash library
https://github.com/adafruit/Adafruit_SPIFlash

User avatar
LEDLIT1
 
Posts: 115
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by LEDLIT1 »

Hi adafruit2,

What would you recommend for a non-volatile storage with the Qt Py? Would it be something like the Adafruit SPI Non-Volatile FRAM Breakout - 64Kbit / 8KByte?

My project needs memory in order to store 4 still patterns for an 85 LED (pixel) strip.

Thank you,
Lou

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by adafruit2 »

the SPI flash on back would work fine https://www.adafruit.com/product/4763

User avatar
LEDLIT1
 
Posts: 115
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by LEDLIT1 »

Thank you adafruit2. I ordered 2 from adafruit.com for my 2 QtPy's. I look forward to learning Adafruit SPIflash.
Lou

User avatar
LEDLIT1
 
Posts: 115
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by LEDLIT1 »

Is there a tutorial on using Adafruit SPIFlash? I soldered the GD25Q16 onto the Qt Py successfully. Now I am trying to test the memory with Adafruit SPIFlash for the first time, but I have an error I can't resolve.
Here is the error I am seeing:

Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "Adafruit QT PY (SAMD21), Small (-Os) (standard), Arduino, Off"

In file included from C:\Users\jlcel\Documents\Arduino\libraries\Adafruit_SPIFlash\examples\SdFat_format\SdFat_format.ino:23:

C:\Users\jlcel\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:38:2: error: #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h

38 | #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h

| ^~~~~

exit status 1

Error compiling for board Adafruit QT PY (SAMD21).

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by adafruit2 »

are you using the adafruit fork of sdfat library?

User avatar
LEDLIT1
 
Posts: 115
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by LEDLIT1 »

I had installed adafruit fork of sdfat at first , but then I deleted that folder after the error message said it was a duplicate.

User avatar
LEDLIT1
 
Posts: 115
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by LEDLIT1 »

I removed sdfat and re-installed SdFat_-_Adafruit_Fork.
It compiles now without the error. Hurray!!

Now I have to figure out how to store and load the 85 LED scenes like I was doing with EEPROM. Below is the store and load code I was using before the QtPy. Can you help me adapt this with the SPIFlash?

void storeEEPROM(int saveNum) {
int start = 85 * 3 * (saveNum - 1);
for (int a = 0; a < 85; a++) {
EEPROM.write(start + a * 3, leds[a].r);
EEPROM.write(start + a * 3 + 1, leds[a].g);
EEPROM.write(start + a * 3 + 2, leds[a].b);
}
}
void loadEEPROM(int saveNum) {
int start = 85 * 3 * (saveNum - 1);
for (int a = 0; a < 85; a++) {
CRGB cur;
cur.r = EEPROM.read(start + a * 3);
cur.g = EEPROM.read(start + a * 3 + 1);
cur.b = EEPROM.read(start + a * 3 + 2);
leds[a] = cur;
}
}

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by adafruit2 »

you can use the filesystem to store a file. check out the many SPIflash examples!

User avatar
LEDLIT1
 
Posts: 115
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

Post by LEDLIT1 »

Thank you for helping with adding memory.

I continued with my experiment and have a new problem.

When I use FastLED ((DemoReel100) with more than 70 LEDs the whole strip flickers and jitters. With less than 70 LEDs, they display smoothly. I experience the same issue when using an Arduino Nano, Adafruit QtPy, Teensy 4.0, and Teensy 3.2. I have researched other forums and also tried adding #define FASTLED_ALLOW_INTERRUPTS 0 before the #include <FastLED.h>, but no luck. May I please have a little more help. I am so close.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”