Particle Cookbook

When browsing through these forums, I often run across amazing tidbits of information. They may or may not relate to anything I’m working on now (or even plan to in the future), but sometimes they are just so full of potential usefulness, I have to click like, just in case I ever need to go back and find it again one day.

It might be a code example. Or it might be some firmware feature that I never knew existed. Or it could be details of how to use a feature that I was confused about. Or it could be a pointer to some useful sensor, power converter, or other piece of hardware.

There are all these great pieces of information in the forums and documentation, and sometimes we didn’t even know we needed that information until we see it.

So I’ve started a Particle Cookbook to start gathering a bunch of this info into one place. Right now, there’s not much there – just three topics with two or three entries each. But I plan to keep adding to it as time allows.

I’m completely open to suggestions, corrections, or whatever. If (when?) it gets big enough, I’ll probably need to move it out of markdown files on Github and into something more structured and searchable.

15 Likes

What a great idea! There are many snippets from @ScruffR and @rickkas7 that I reference all the time, and having it all in one place will definitely be useful.

3 Likes

Oh, for sure! The first few tips I threw in there, I was starting to think I was just making a collection of @rickkas7 posts! :wink:

1 Like

That’s awesome. Thank you. I already “starred” and “watching” your github link.
I started bookmarking posts, liking posts and then used the forum’s search to find stuff. I accumulated a huge list of links which narrow down my search using the forum’s search.
However, what I search for may not be under the same keywords of the post. I might have liked a post because of some snippet of code which I could use for something unrelated.
I think the forum software (Discourse?) could also help out. I wish it had a cataloging feature like Hackster.io where you can file posts under descriptive headings that remind me why I saved a particular post.
Thanks again.

1 Like

I’ve forked the project and I’m adding some changes:
https://github.com/nrobinson2000/particle-cookbook

You can view the result here:
https://nrobinson2000.github.io/particle-cookbook/

2 Likes

Looks good, @nrobinson2000! I’d be happy to merge those changes into my end. I’ve also added some new material this morning.

3 Likes

I’ve copied your new material into my fork. I’d recommend following the styling and structure I’m using so that it looks nice when github generates a webpage for it with GitHub Pages.

Rather than forking someone’s project to branch off or overtake, why not all contribute to a single source? Otherwise we’ll ens up with something like this:

In fact, a similar effort was already started by Particle on GitHub, which might be interesting to pick up:

5 Likes

@Moors7: Well, I didn’t know that was there, for one thing. I probably didn’t notice it because it hasn’t been updated in seven months. I did do some searching to make sure there wasn’t already something around like what I had in mind. And though what I’ve made so far might appear to be not much more than another curated list of links, I want it to become more than that. To start with, my main priority is to start fleshing out a few base topics based on things that have caught my eye recently. But the goal is to fill it out with code examples and more details so that it is a stand-alone resource. It will still link out to original sources to give credit where credit is due, but it should be more than just a list of links to other things. Also, I’ve now added a link to Particle Awesome in my “See Also” section.

@nrobinson2000: If you’ll make a Pull Request of your changes, I’ll incorporate them.

3 Likes

No worries from my end, I applaud the effort as there’s a wealth of ‘hidden’ knowledge around here, some of which only found by those who were there when it was written :raised_hand:
I’m just hoping this doesn’t turn into a multi-branched, multi-owner, version, as that certainly wouldn’t benefit the end-goal of keeping things focused in one spot. It is with that in mind that I thought of that “awesome list”, since that’s already officially supported, and contains useful links. I think that wouldn’t be a bad place for the code examples you mentioned. Perhaps @bsatrom has some thought on this as the creator of that list.
Regardless where this goes from here, thanks for your time and effort, it’s appreciated!

2 Likes

Wiki, anyone?

@woodwhcker: I did consider using the wiki, and in the end, I could end up doing that. But I’m still not sure what the final “shape” of the Cookbook will be. As we add more material to it, the categorization scheme might change, or I might decide to reformat everything. Sweeping changes like that will be easier to manage while the underlying data system is as simple as possible – a set of text files.

@nrobinson2000: I’ve merged your changes with my latest, enabled the Github Pages feature in my repo, and added you as a collaborator on my repo.

2 Likes

Thanks @Moors7! @dougal I also applaud the effort and agree that resources like this are much-needed, as well as a better way of creating these kinds of “cookbooks” in the official docs. The Awesome List was my early attempt to do something similar last year. True that it hasn’t been updated in a bit, but I also take Pull Requests, and any tweaks we make here do get bubbled up into the official Particle docs, so if you’re willing to incorporate some of your excellent work there, we’d be happy to have the contributions!

4 Likes

Heres a tip that might save someone a few days of fiddling with baud rates and cursing late into the night when using an external GPS with an electron, put the RX and TX through a level shifter, it’s one of the few 5v sensors That the electron doesn’t tolerate.

2 Likes

Recent additions:

  • Added a Particle Workbench section, with information about the retained keyword Intellisense problem.
  • Added specific advice and examples to the Sleep Modes section.
1 Like

Recent additions:

  • Added example code for checking power source (Vin/Battery) and battery charge status for devices that support it (Argon, Boron, Electron Xenon).
  • Added example code for encryption/decryption using AES256 (though, it’s not linked from any of the documentation, yet).
  • Started an outline for a Connectivity section covering Particle Cloud, WiFi, Mesh, System Modes, etc. (might need to break into sub-sections).

Kudos to @rickkas7, who seems to be the inspiration for about 80% of the content. :rofl:

If anyone has favorite tips or code examples that they think would be good additions, please don’t hesitate to let me know. Just zap me a private message here, or create an Issue on Github.

1 Like

Latest changes:

  • Add info about Xenons unexpectedly pulling D5 high
  • Add information about the maximum sleep time counter in Gen3 (Mesh) devices.
  • Adding details about how to setup Gen3 (Mesh) devices locally, without using one of the mobile apps. First pass is just for Argon.
  • Added preliminary connectivity chapter (not linked yet).
    • Started section for SYSTEM_MODE()
    • Started section for SYSTEM_THREAD(ENABLED)
    • Added some info about local cloud server
1 Like

hi dougal,

This is a great resource, T tried to click on the link below and got a 404 error, just a heads up.
[Example Code for Electron and Boron]
(https://github.com/dougalcampbell/particle-cookbook/blob/master/particle-cookbook/examples/power/get-power-status-electron-boron-01.ino)