|Project Goal||Get your Particle Photon online and claimed to your account|
|What you’ll learn||How to claim a new Particle device using a mobile app, web browser or the CLI.|
|Tools you’ll need||A Photon, USB Cable, the Particle CLI|
|Time needed to complete||15 minutes|
Particle provides three methods for claiming a new Photon:
Approaches #1 and #2 use SoftAP capabilities on the Photon to cause the device to appear as a Wi-Fi access point. Once connected, you can configure the device's connection to a local Wi-Fi network. Approach #3 is more common for power users or in workshop settings where a large number of devices are being claimed simultaneously.
Once you've claimed your Photon, you'll use Tinker on the Particle mobile app to interact with your new device.
- Create a new Particle account
- Install the Particle iOS or Android App
- Install the Particle CLI
- Install the Particle Desktop IDE
Note: Images below are from the iOS setup. The flow of the Android setup experience is similar.
Open the Particle Mobile App.
Login, or create a new account if you don't already have one.
On the "Your Devices" screen, click the "+" in the top-right to add a new device.
Select the "Photon" option.
Plug your device into power using a USB cable. You can connect to a computer, though this is not required when using the mobile app.
The next screen will instruct you to go to your phone's Settings and to look for a Wi-Fi access point named "Photon-" and a string of characters unique to the device.
Note: The app will suggest that this string is 4 characters long. For newer Photons, this string will be six characters long. For instance, the Photon below broadcasts "Photon-UQGKCR." This string corresponds to the last six characters of the UPC code printed on the box for your device.
Once you've selected the Photon access point, you'll see a notification that you can return to the Particle app to continue setup.
The app will then connect to the Photon, scan for Wi-Fi networks and prompt you to select a network.
Then, you'll be prompted for the network password.
The app will then configure Wi-Fi on the device, reset it, wait for a Device Cloud connection and verify your ownership of the device.
Finally, you'll be prompted to name your device. You can use the suggested name, or choose your own. Once you click done, your Photon is ready for use, and you can play with it via Tinker using the instructions below!
Plug your Photon into a serial port on your computer.
Make sure your device is in "Listening Mode" (aka blinking blue). If the Photon is not in listening mode, hold down the
SETUPbutton for three seconds, until the RGB LED begins blinking blue.
particle loginto login with your account.
particle setupand follow the on-screen prompts. The CLI should automatically detect your USB connected Photon. If it doesn't, make sure that the device is blinking blue, indicating that it is in listening mode.
The CLI will scan for nearby Wi-Fi networks and present you with a list to choose from. Select the network as identified by your instructor.
Follow the prompts to auto-detect the security type for your network, then enter the password. This should have been provided by your workshop instructor.
Once you've entered the network password, your device will reset and start "breathing cyan," indicating that it has successfully connected to the Particle Device Cloud.
Now it's time to name your new Photon. Pick something fun and memorable!
If you're online, skip below to play with your new Photon with Tinker. For reference, we've provided the setup instructions for the web and mobile approaches, below.
Navigate to setup.particle.io in your browser
Choose "Setup a Photon" and select Next
Make sure you have your Photon on hand and a USB power cable available
Download the Photon Setup File to your computer
Find your device in the Wi-Fi List and Connect to it. Look for a Wi-Fi access point named "Photon-" and a string of characters unique to the device (Note: the app will suggest that this string is 4 characters long. For newer Photons, this string will be six characters long. For instance, the Photon below broadcasts "Photon-CKDH2Z." This string corresponds to the last six characters of the UPC code printed on the box for your device.)
The browser will automatically detect when you've connected to your Photon and prompt you to choose a network SSID and enter the password.
Reconnect to your network so that the device's connection can be verified. If everything works, you'll be instructed to name your device.
Pick a name. You can use the suggested name, or choose your own.
Once you click done, your Photon is ready for use, and you can play with it via Tinker using the instructions below!
Now that you've claimed your Photon, let's light up an LED!
Note: images below are from the iOS setup. The flow of the Android setup experience is similar.
Open the Particle Mobile App.
Your new device should show up in the list with the name you gave it. If the Tinker firmware is still on the device, you'll see that indicated as well. If Tinker is not still on the device, you can flash it back onto the device using the Particle CLI with the command
particle flash <deviceName> tinker.
Tap the device you want to interact with via Tinker.
When you select a device flashed with the Tinker firmware, you'll see a list of all the GPIO pins on the Photon, eight on each side, or 16 in total. With Tinker, you can control the digital and analog pins via reads and writes. If you have sensors or actuators connected to the Photon, you can control them with Tinker.
Every Photon has a blue LED that's connected to pin D7, and we can use Tinker to control this LED. Tap on the circle marked "D7" and you'll see a pop-up that gives you two options,
digitalWrite. We'll learn more about what these mean in the next lab. For now, click on
Once you select
digitalWritethe pin button will be highlighted in red and show its current value. At first, this value will be digital
Tap the button. You'll notice that it changed to
When the value changes to high, you'll also notice that the blue light at D7 is on! Behind the scenes, Tinker is calling the
digitalWriteand passing in either a
HIGHvalue, which turns the LED off or on. Press the button again and you'll note that the LED turns back off.
Congratulations! You've claimed and named your first Photon, and made it light up using the Tinker app. Now it's time to start building a real app that connects to sensors and controls actuators!