The Photon 2 is a powerful Wi-Fi development kit designed for creating connected projects and products. It features a microcontroller with built-in Wi-Fi, making it ideal for Internet of Things (IoT) applications. The Photon 2 is perfect for developers looking to build smart devices, home automation systems, and other connected solutions.
Parameter | Value |
---|---|
Microcontroller | ARM Cortex-M4 |
Operating Voltage | 3.3V |
Input Voltage | 3.6V - 5.5V |
Digital I/O Pins | 18 |
Analog Input Pins | 8 |
Flash Memory | 1MB |
RAM | 256KB |
Wi-Fi | 802.11 b/g/n |
Clock Speed | 120 MHz |
Dimensions | 36.58mm x 20.32mm |
Pin Number | Pin Name | Description |
---|---|---|
1 | VIN | Input voltage (3.6V - 5.5V) |
2 | GND | Ground |
3 | D0 | Digital I/O |
4 | D1 | Digital I/O |
5 | D2 | Digital I/O |
6 | D3 | Digital I/O |
7 | D4 | Digital I/O |
8 | D5 | Digital I/O |
9 | D6 | Digital I/O |
10 | D7 | Digital I/O |
11 | A0 | Analog Input |
12 | A1 | Analog Input |
13 | A2 | Analog Input |
14 | A3 | Analog Input |
15 | A4 | Analog Input |
16 | A5 | Analog Input |
17 | A6 | Analog Input |
18 | A7 | Analog Input |
Powering the Photon 2:
Connecting to Wi-Fi:
Digital I/O:
Analog Input:
// Example code to connect Photon 2 to Wi-Fi and control an LED
#include <WiFi.h> // Include the Wi-Fi library
const char* ssid = "your_SSID"; // Your Wi-Fi SSID
const char* password = "your_PASSWORD"; // Your Wi-Fi password
void setup() {
pinMode(D0, OUTPUT); // Set D0 as an output pin
Serial.begin(115200); // Initialize serial communication
// Connect to Wi-Fi
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
digitalWrite(D0, HIGH); // Turn the LED on
delay(1000); // Wait for a second
digitalWrite(D0, LOW); // Turn the LED off
delay(1000); // Wait for a second
}
Wi-Fi Connection Issues:
Power Supply Problems:
Digital I/O Malfunctions:
Wi-Fi Connection:
Power Supply:
Digital I/O:
By following this documentation, users can effectively utilize the Photon 2 for their IoT projects and connected solutions. Whether you are a beginner or an experienced developer, the Photon 2 offers a versatile and powerful platform for creating innovative and smart devices.