Particle Libraries v2.0

Came across the mention of “Particle Libraries 2.0” in spark/firmware, and that it’s coming soon.

Is it an improved infrastructure/flow for submitting community/vendor code libraries to the Web IDE?

Or is it an updated way for users to manage/compile our own code libraries for local/cloud-based compilers? It seems like the latter, reading off the comments here. But how will if affect users relying on the Web IDE, or users who adopt the Particle Dev-style of writing code (locally, then compiling from cloud)?

Can anyone shed more light as to what it is? Apologies if this documentation is already in the works; just curious!

It’s a mix of stuff that conforms to Arduino’s way of included project dependencies etc, pulling libraries from the :cloud:, add 3rd party libraries etc.

The Elites are doing the beta testing at this phase so stay tuned :slight_smile:

2 Likes

i will stay tuned. about time the library system is given an overhaul! :+1:

1 Like

Here’s a preview…

KENMBP:cli-lib kennethlimcp$ p --version
2.0.0-libraries.4
KENMBP:cli-lib kennethlimcp$ tree
.
└── src
    └── application.cpp

1 directory, 1 file
KENMBP:cli-lib kennethlimcp$ particle library add neopixel

KENMBP:cli-lib kennethlimcp$ 
KENMBP:cli-lib kennethlimcp$ tree
.
├── project.properties
└── src
    └── application.cpp

1 directory, 2 files
KENMBP:cli-lib kennethlimcp$ cat project.properties 
dependencies.neopixel=0.0.10
5 Likes

It’s all of the above!

Libraries are getting an overhaul to be compatible with Arduino. The dev tools, Build web IDE, CLI and Particle Dev, will all support including libraries.

As you can imagine it’s a big undertaking so we want to make sure it’s working well before doing a big public release.

1 Like

What exactly does that mean?

I know there is a decent amount of work sometimes to modify Arduino libraries to work on Photon’s. Sounds interesting though.

@RWB, it means the library FORMAT will be the same as Arduino’s but you still need to adapt Arduino libraries for Particle. However, it really means that you can make the libraries work on both Arduino and Particle devices (assuming you designed them that way).

Got it. I’m reading over the beta info now.

Once you guys get everything ironed out it will be a step in the right direction :smiley:

Shit I just foud the Particle DEV software a few days ago, I thought you guys where programming offline using just the CLI, I have no idea how I missed that one :

I love how the Particle team keeps raising the bar on every aspect of this platform. Keep up the great work!

@RWB, there is the IDE, Particle DEV, CLI and a local toolchain (compiler, etc) that you can use to develop with!

That’s a pretty strong signal we need to guide people to Dev better.

3 Likes

Yea for the most part programming via the online IDE was just fine for me.

Then when the windows CLI installer was released a week or so ago I was finally able to get the CLI properly installed without having to jump though all the individual processes the old install instructions requried. That was a big help. I used the CLI to program the Electron with the latest 0.6.0 fimrware.

Then I found the Particle DEV, installed it, and then saw how beautiful and useful that is :smiley:

I get free time here and there from the business so I’ve been playing catch up over the last few days and I feel like I’ve made some decent progress getting back up to speed on the latest firmware improvement.

You guys are light years ahead of a beginner like me though which is good since I would be lost without the forum help.

Will this make easy setup for Visual Studio , using http://www.visualmicro.com/ plausible?

The Particle DEV can be unsatisfactory for me, and I’ve had no luck installing it, without any problems.
Coming from VS, the Atom IDE is really a big step behind in many ways. Sorry, but and I can’t really see the reason why to use it when I’m always missing features I have in VS.

Everybody could be a better programmer with the right swiss knife, with VS providing IntelliSense that actually works etc.

So I’m very happy to see the development with Particle Libraries v2 is moving forward! I was just about to set up VS to compile locally myself :smiley:

Will there be a central “package list” that is available via API/CLI? Build is great but I pull most libs I use directly from github and I would like to have a package manager that is analogous to bower or npm where I can define a dependency, version (min or specific) and update them automatically by pulling the latest from the source/api. I would happily help any way I can to make that happen.

That’s pretty much how it should work: You define a dependency and the respective libs will be pulled in when building - I even think that chained/nested dependencies will be dealt with.

Thank you for working on this. I’m trying to move my project to local development with Particle Dev and git but I’m having a hard time understanding how to include cloud libraries without resorting to git submodules, copying, or excessive flattening. I’d love to see some kind of git <–> web IDE integration some time too, so that my “Current App” in the web IDE could point to a git repo branch / tag, perhaps pulling the “optional description” from a config/properties/README.md file.

2 Likes

For anyone like me that was watching this thread for Libraries 2.0 updates, and missed the news elsewhere:

https://blog.particle.io/2017/01/18/particle-libraries/

@Pixelmatix, good find! The team is planning to make some announcements soon and that’s like a preview post. Let’s wait for the official news :wink:

I was wondering what was going on with this. I’ve noticed three different posts on the blog (seen via RSS notification), but the instructions and downloads didn’t seem quite ready. :smile:

@jvanier, is there a way that library examples can require their own additional dependencies?
I, for example, have an Adafruit_HX8357 library that only requires Adafruit_mfGFX to work as is, but I’ve got multiple samples each of which may require other libraries (e.g. SDFat or Touch_4Wire).
How would I go about that for examples?
In a “normal” project, I’d just create a project.properties file, but can I do that for “inbuilt” examples too?
Do I still need to explicitly add the “owning” library as dependency too?
The last point proves somewhat tricky when submitting a lib the first time, since you can’t add the “home” dependency since the lib is not yet available :wink:


Update:

Yeah, I’d like to have this too but library examples with additional dependencies didn’t make it to the first public release.