Photon Development Guide

Particle Build (Online)

The Particle Build IDE is an always-online, browser-based portal where your Photon code can be edited, saved, and shared. This cloud-based IDE handles code compilation and flashes the built binaries to your Photon over-the-air. You don’t even need your Photon next to you to update its program!

If it’s your first time working with Build you may have to create an account, otherwise log in to one you’ve already created.

Tour of the Build IDE

The majority of the Build IDE’s window is taken up by your code view – as it should be. To navigate around the Build IDE there are buttons on the left side of the window. Hover over any button to get a brief overview of what it does – you’ll quickly become familiar with all of these icons.

– Settings This is where you can log out, change your password, or find your access token.

Selecting Your Device, Programming Blink

Before you can upload any code, you have to tell the IDE which of your Photon’s you’d like to flash it to. Click on the “Devices” tab to see your list of Photons, Cores, and P1 modules.

Mark the Photon you want to program with a yellow star, by clicking to the left of the name. You can only select one device at a time.

After selecting your device, navigate over to the Code tab, and either create a new App or select one of the examples. For your first try, the Blink and LED example is always a good tool to test with.

Finally, click the Flash button in the top-left corner and watch the bottom status-bar area of the IDE. The text down there will keep you up-to-date on how the flash process is progressing. Your Photon’s RGB LED will also display it’s status – it should go from breathing cyan (connected to cloud), to blinking magenta (receiving flash), to blinking green (update done, connecting to WiFi), back to breathing cyan.

Including Libraries

Particle’s community-contributed libraries allow you to easily plug proven code to your application with the click of a button. Adding a library to an app can be somewhat confusing the first time through, so here’s a quick rundown.

Create an App – Before you can add a library to an application, you have to have one created for it. Switch to the Code tab, and click Create New App. Name it whatever you please, you can always change it. Press enter to create the app.

Select the Library – Once you’ve found the library you’re looking for, click on it to load up an overview of it. Here you’ll be able to view all of the library’s contents, and even get some information about what the library does.

Include in App – Finally, click the Include in App button, then click the app it’s destined for. To verify, click Add to this App. Magically, an #include statement will appear at the top of your app.

Note that simply copy/pasting the #include statement won’t actually add the library to your app, you need to go through the “Include in App” process.

In 2003, CU student Nate Seidle blew a power supply in his dorm room and, in lieu of a way to order easy replacements, decided to start his own company. Since then, SparkFun has been committed to sustainably helping our world achieve electronics literacy from our headquarters in Boulder, Colorado.

No matter your vision, SparkFun's products and resources are designed to make the world of electronics more accessible. In addition to over 2,000 open source components and widgets, SparkFun offers curriculum, training and online tutorials designed to help demystify the wonderful world of embedded electronics. We're here to help you start something.