I or my brother will be attempting to introduce my nephews to programming. To that end, he purchased a Photon/Internet Button (IB). Given the documents are a bit deeper than your average 10 year old can work through, and at times gave me trouble, this is part of my ongoing effort to be sure I understand what the Photon/Internet Button is, and capture in one place the steps needed to set up a Photon mounted in an Internet Button shield. The intent is to be sure I’ve got a good idea of what needs to be done to connect to it, and if something doesn’t go as planned, have a quick reference to follow. I’m also trying to make sure I have a reasonable understanding of exactly what a Photon/Internet Button is so I don’t make promises I can’t keep in regards to capabilities. What follows is one page of “I think this is what I have.” and one page of “This is how to connect to and start to use it.”
I’ve received a lot of input and corrections from Jordy Moors as I’ve worked through all of this, and PKinOttawa provided more insight. I’m sure forum members will continue to correct my errors, or at least point me to where I need to be reading. Some of the text below is a copy/paste from the documents, some is my addition to make sure I understand what we are talking about. Some text that’s important for troubleshooting or more depth I’ve purposely skipped around. In the end, I hope this can help others who may need a quick “How-to.”
The Internet Button is a ready-to-use IoT (Internet of Things) device with sensors, LEDs, and more. Place orders online, send emails, receive notifications, track feedback, and develop hundreds of other applications. (https://www.particle.io/products/hardware/internet-button). PKinOttawa points out the Photon can be used without connecting to the internet.
The device is a Photon mounted in a shield called the Internet Button. The Internet Button is pre-wired with 11 individually controllable RGB LEDs, an ADXL362 3-axis accelerometer, 4 tactile buttons for D-pad style interactions, a Female socket for connection to a Particle device (the supplied Photon comes mounted in it), and additional female headers for adding extra actuators and sensors). Jprdy and PKinOttawa both point out the Photon is NOT an Arduino (I went from ignorant to informed), so I “assume” Arduino shields can’t be attached to the headers.
Simple and easy set up
Setting up the Photon/IB isn’t complicated. Change one line of code to change the actions of the button. Connect via IFTTT (If This Then That), through a USB cable with the Particle Command Line Interface (CLI), a smartphone app, or from the Particle web IDE (Integrated Development Environment)/Build and you can make phone calls, send texts and purchase items online in just minutes. I believe what you want to do will in part drive how you need to connect.
You will need to “claim” (claiming and connecting seem to be used interchangeably) your Photon/IB through the Particle.io web site/server or through the Particle CLI. You will also give it a name, I used “IB1” as an imaginative title. This ensures commands go through their server for security. If you use the Particle CLI, type “particle setup” and the program will do a nice job of walking you through claiming your device.
Particle.io server process.
- Connect to the internet over wireless.
- Install the Photon app on your phone
- Create a Particle account or log in.
- Open your smartphone Particle app.
a. Click the “+” sign
b. Click Set up a Photon
c. The app will tell you to plug in your Photon (any proper voltage power supply can be used, but using a USB port on your computer is helpful. If this process doesn’t work you will be prepared to use the Particle CLI through the USB cable).
i. Check that your Photon/IB is flashing blue (Listening mode; SoftAP on; ready to be set up).
ii. Or per Jordy, cyan (Connecting to cloud; Trying to connect to Particle).
- Per https://docs.particle.io/guide/getting-started/start/core/, your Photon/IB (Core) will go through the following colors:
• Blinking blue: Listening for Wi-Fi credentials
• Solid blue: Getting Wi-Fi info from app
• Blinking green: Connecting to the Wi-Fi network
• Blinking cyan: Connecting to the Particle Cloud
• Blinking magenta: Updating to the newest firmware
• Breathing cyan: Connected!
d. Your Photon/IB should be listed.
- Navigate your web browser to the Particle Build IDE (“web IDE" or "Build”).
a. NOTE: The https://docs.particle.io/support/troubleshooting/device-management/core/ document calls the icon to claim your device two different names, “Core” and “Devices” Either way, it is 3rd from the bottom and looks like a gunsight.
Using the Particle Command Line Interface
- Install the Particle CLI for your operating system https://docs.particle.io/guide/tools-and-features/cli/core/
- Make sure you’ve got the Particle CLI installed by typing “particle help” into your terminal. If you’re presented with a list of commands, the CLI is installed correctly. If not, please see the following article (ops, need the link. Sorry).
- Log onto Particle.io
a. If you are logged into particle.io through a web browser, the Particle CLI will acknowledge you as logged in when you start “particle setup”.
b. To log onto particle.io through the Particle CLI, type “particle login”
- Type “particle setup” and the program will take you through claiming your device.
After that comes obtaining and writing code and flashing it to your Photon/IB using either the web IDE/”build” https://docs.particle.io/guide/getting-started/build/photon/#web-ide or by downloading the Desktop IDE https://www.particle.io/products/development-tools/particle-desktop-ide
In the phone app you can tap on your device/Photon/IB and enter “Tinker” that will send small programs of your choice, 16 are listed, to your device/Photon/IB.
So how close am I getting?