0

Adafruit QT Py and NeoPixel strip with Arduino IDE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by LEDLIT1 on Mon Dec 14, 2020 2:18 pm

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

LEDLIT1
 
Posts: 89
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by adafruit2 on Mon Dec 14, 2020 3:37 pm

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

adafruit2
Site Admin
 
Posts: 19757
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by LEDLIT1 on Mon Dec 14, 2020 3:47 pm

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

LEDLIT1
 
Posts: 89
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by adafruit2 on Mon Dec 14, 2020 4:00 pm

there is no eeprom on the device available

adafruit2
Site Admin
 
Posts: 19757
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by LEDLIT1 on Mon Dec 14, 2020 4:18 pm

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

LEDLIT1
 
Posts: 89
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by adafruit2 on Mon Dec 14, 2020 4:21 pm

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

adafruit2
Site Admin
 
Posts: 19757
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by LEDLIT1 on Mon Dec 14, 2020 6:32 pm

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

LEDLIT1
 
Posts: 89
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by adafruit2 on Mon Dec 14, 2020 6:38 pm

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

adafruit2
Site Admin
 
Posts: 19757
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by LEDLIT1 on Tue Dec 15, 2020 12:08 pm

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

LEDLIT1
 
Posts: 89
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by LEDLIT1 on Tue Dec 29, 2020 1:46 pm

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).

LEDLIT1
 
Posts: 89
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by adafruit2 on Tue Dec 29, 2020 1:48 pm

are you using the adafruit fork of sdfat library?

adafruit2
Site Admin
 
Posts: 19757
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by LEDLIT1 on Tue Dec 29, 2020 2:14 pm

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

LEDLIT1
 
Posts: 89
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by LEDLIT1 on Tue Dec 29, 2020 3:52 pm

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;
}
}

LEDLIT1
 
Posts: 89
Joined: Mon Oct 17, 2016 11:14 am

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by adafruit2 on Tue Dec 29, 2020 4:11 pm

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

adafruit2
Site Admin
 
Posts: 19757
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit QT Py and NeoPixel strip with Arduino IDE

by LEDLIT1 on Sat Jan 02, 2021 6:18 pm

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.

LEDLIT1
 
Posts: 89
Joined: Mon Oct 17, 2016 11:14 am

Please be positive and constructive with your questions and comments.