QT Py 2040 neopixel C++

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
djmaxwell
 
Posts: 1
Joined: Sat Apr 01, 2023 7:32 pm

QT Py 2040 neopixel C++

Post by djmaxwell »

I am trying to access the onboard neopixel using C++. I downloaded the Adafruit NeoPixel Library for Pi PICO C/C++ SDK but cannot get it to build. I get a cmake error

rp2_common/pico_stdlib/CMakeLists.txt:29 (set_target_properties):
INTERFACE_LIBRARY targets may only have whitelisted properties. The
property "PICO_TARGET_STDIO_USB" is not allowed.
Call Stack (most recent call first):
/home/maxweld/repos/pi-pico-adafruit-neopixels/pico_neopixels/CMakeLists.txt:9 (pico_enable_stdio_usb)

Anyone try this or have other suggestions on how to access the neopixel?

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: QT Py 2040 neopixel C++

Post by adafruit_support_mike »

Try the code from this tutorial page and see if it works:

https://learn.adafruit.com/adafruit-qt- ... ch-3108243

User avatar
robcranfill
 
Posts: 142
Joined: Wed Feb 13, 2013 4:14 pm

Re: QT Py 2040 neopixel C++

Post by robcranfill »

I myself am wanting to use the NeoPixel on my Feather 2040 from the C SDK, and just found your question here - very timely. I don't have a solution, exactly, but thought I'd say that the C library you mention, "Adafruit_NeoPixel", is for the Arduino SDK, not the Visual Studio Code-based "Pico SDK" that I'm using. (adafruit_support_mike's example code is for Arduino, too.) Perhaps that's the disconnect you are finding, too.

I guess saying "C SDK" isn't specific enough, given the two very different dev environments one could be using. :-)

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

Return to “Microcontrollers”