Page 29 - Programming the Photon Getting Started With the Internet of Things
P. 29
2
Getting Connected
In this chapter we will show you the many ways of connecting your Photon board to the
Particle cloud and start programming. By far the easiest way to connect to your Photon is
using the Tinker application on your smart phone for either iOS or Android, but just in
case that doesn’t work out for you or you do not have a smart device, we will show you
other methods of connecting to your Photon.
Board Features
Before we get started, it’s important that you fully understand the board itself and some of
the useful features, including the most important RGB (red, green, blue) light-emitting
diode (LED), which will become your ultimate tool when understanding what the board is
doing.
Looking at Figure 2.1 of the Photon board, you can see there are lots of pin headers, a
few buttons, and a bright flashy LED. There are two buttons located on the Photon: the
RESET button, which is located on the right when holding the Photon with the universal
serial bus (USB) port at the top, and the SETUP button, which is located on the left side of
the Photon.
Holding down the RESET button will effectively initiate a hard reset of the device,
powering the device down and then repowering the device back up. If you have loaded a
program into the Photon and you are experiencing some issue, then this is a good way to
restart the program.
The SETUP button does a number of things when held down. When held down for 3
seconds, this puts the Photon into something called Smart Config—this allows your
Photon to connect to your local Wi-Fi network and will be indicated by a blue flashing
LED. When the SETUP button is held down for up to 10 seconds, this clears the Photon’s
Wi-Fi memory and deletes any saved Wi-Fi credentials. This is particularly useful if you
want to connect to another Wi-Fi network or are experiencing issues with the current
network. If you hold down the SETUP button and then instantly tap the RESET button,
this initiates the Bootloader mode after 3 seconds. The Bootloader mode enables you to
reprogram the Photon through USB or using the Joint Test Action Group (JTAG) add-on
board. The Bootloader mode will be indicated by a flashing yellow LED. If you have
entered this state by mistake, you can simply hit the RESET button again to exit it. If your