Is it possible to add libraries to the IDE?

Thanks for the great question @gsklinger! Here’s the general rule:

If you look at the library .h and .cpp files, and it is platform independent, then you can just paste them into Spark Build — you would paste first the .h file contents, then the .cpp file contents, then your code at the bottom.

The Adafruit Neopixel library includes assembly language and twiddles the microcontroller registers, so it is platform dependent. This will actually be true of most libraries, meaning the “just paste it in” method doesn’t work most of the time.

For libraries like Neopixel, someone needs to port the code to the STM32 microcontroller. We can do it internally at Spark, but only once it rises to the top of the priority list. However, since the Spark firmware is open source, anyone is free to port the library and submit a pull request.

Make sense? Further questions? I’ll add porting Neopixel to our backlog. Cheers!

1 Like