If you have an Internet Button, read through this section to get started and connect your device, then hop over to the Internet Button Guide for more detailed info.
Let's quickly go over what you see.
The Wi-Fi Module. This is probably why you bought your device-- the Wi-Fi module allows your Core to communicate with the internet. It connects your device to the internet in the same way that your smartphone might connect to a wifi network.
The microcontroller is the brain of your device. It runs your software and tells your prototype what to do. Unlike your computer, it can only run one application (often called firmware or an embedded application). This application can be simple (just a few lines of code), or very complex, depending on what you want to do. The microcontroller interacts with the outside world using pins.
The Pins. Pins are the input and output parts of the microcontroller that are exposed on the sides of your device. GPIO pins can be hooked to sensors or buttons to listen to the world, or they can be hooked to lights and buzzers to act upon the world. There are also pins to allow you to power your device, or power motors and outputs outside of your device. There are pins for Serial/UART communication, and a pin for resetting your device.
Buttons and LEDs.
There are several awesome buttons and LEDs on your Core to make it easier to use.
MODEbutton is on the left and the
RSTbutton is on the right. You can use these buttons to help you set your device's mode.
- The RGB LED is in the center of your Core, above the module. The color of the RGB LED tells you what mode your Core is currently in.
- The D7 LED in the upper right side of your Core. This LED will turn on when the D7 pin is set to
- Your Particle device, brand new and out of the box!
- USB to micro USB cable
- Power source for USB cable (such as your computer, USB battery, or power brick)
- Your iPhone or Android or Windows smartphone
- Wi-Fi Settings
- 2.4GHz capable router
- Channels 1-11
- WPA/WPA2 encryption
- On a broadcast SSID network
- Not behind a hard firewall or Enterprise network
- Note: We do not recommend using WEP Wi-Fi settings, for security reasons.
- None! This is your first project.
In this example, we will connect your device to the internet for the very first time. Then, we will blink the D7 LED on your device by using your smartphone.
Plug the USB cable into your power source. (Your computer works perfectly for this purpose.)Your Particle device does not need your computer to connect to wifi. You could just as easily power your device with a power brick, a battery shield, or another power source wired to the VIN pin.
As soon as it is plugged in, the RGB LED on your device should begin blinking blue.
If your device is not blinking blue, hold down the MODE button.
If your device is not blinking at all, or if the LED is burning a dull orange color, it may not be getting enough power. Try changing your power source or USB cable.
Open the app on your phone. Log in or sign up for an account with Particle if you don't have one.
Press the plus icon and select the device you'd like to add. Then follow the instructions on the screen to connect your device to Wi-Fi.Your device remembers up to 7 wifi networks, and it will connect to these automatically if it can find them. Remember that to connect the Core, you need the older Spark Core app and to connect the Photon you need the new Particle App.
This may take a little while - but don't worry.
While you're waiting, your 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 Device Cloud
- Blinking magenta: Updating to the newest firmware
- Breathing cyan: Connected!
If you can't seem to get the Mobile App to connect your device, that's okay! Read over this example quickly, and then check out the next lesson to connect your device using the USB cable.
Once you have connected your device, it has learned that network. Your device can store up to seven networks. To add a new network after your initial setup, you'd put your device into Listening Mode again and proceed as above (the claiming part can be skipped). If you feel like your device has too many networks on it, you can wipe your device's memory of any Wi-Fi networks it has learned. You can do so by continuing to hold the
MODE button for 10 seconds until the RGB LED flashes blue quickly, signaling that all profiles have been deleted.
The Spark Core App should now be on the TinkerWe have taken the liberty of loading some firmware onto your device for you. It is called Tinker, and it helps you talk to your device by sending power to the pins and reading power levels from the pins. More info about Tinker is available here. screen, as shown below.
As you can see on your smartphone, the circles represent different pins on your device. If you tap on these circles, you can see the Tinker functions available for the associated pins.
We could use Tinker and the smartphone app to talk to any pin on your device. If you had a buzzer, an LED, a sensor, etc., you could interact with it using Tinker on your phone. But since I know you're very eager to get started, let's use an LED already provided on your device.
The D7 pin comes already wired to a small blue LED on the face of your device. When you set the power of the D7 pin to high, this LED turns on. Let's do that now.
digitalWrite in the popup. Now when you tap the D7 circle the tiny blue LED should turn off or on!
Congratulations, you just blinked an LED over the internet, using your Particle device!
Keep in mind that with Tinker, you can communicate with any of the pins, not just with the D7 LED. You can wire things to the pins to run motors, read sensors, and much more. The real fun part comes when you write your own firmware, of course. We'll go over that in later sections.
If you don't have your smartphone with you, go ahead and move to the next lesson on connecting over USB.. If you've successfully connected with your smartphone and you'd like to keep playing around with Tinker, skip ahead to learn device modes and then do some Tinker examples.
Otherwise, go to the next section to learn to connect over USB.