

The Photon 2 is a microcontroller development board designed specifically for Internet of Things (IoT) applications. It features built-in Wi-Fi connectivity, a powerful ARM Cortex-M3 processor, and a variety of General-Purpose Input/Output (GPIO) pins for interfacing with sensors and other peripherals. This makes it an ideal choice for developers looking to create connected devices and smart applications.








| Specification | Value |
|---|---|
| Processor | ARM Cortex-M3 |
| Clock Speed | 120 MHz |
| Flash Memory | 1 MB |
| RAM | 256 KB |
| Wi-Fi | 802.11 b/g/n |
| Operating Voltage | 3.3V |
| Input Voltage | 3.6V to 5.5V |
| Digital I/O Pins | 18 |
| Analog Input Pins | 8 |
| PWM Pins | 8 |
| UART | 1 |
| SPI | 1 |
| I2C | 1 |
| USB | Micro USB for power and programming |
| Dimensions | 36mm x 24mm |
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VIN | Input voltage (3.6V to 5.5V) |
| 2 | GND | Ground |
| 3 | 3V3 | 3.3V output |
| 4 | D0 | Digital I/O |
| 5 | D1 | Digital I/O |
| 6 | D2 | Digital I/O |
| 7 | D3 | Digital I/O |
| 8 | D4 | Digital I/O |
| 9 | D5 | Digital I/O |
| 10 | D6 | Digital I/O |
| 11 | D7 | Digital I/O |
| 12 | A0 | Analog Input |
| 13 | A1 | Analog Input |
| 14 | A2 | Analog Input |
| 15 | A3 | Analog Input |
| 16 | A4 | Analog Input |
| 17 | A5 | Analog Input |
| 18 | A6 | Analog Input |
| 19 | A7 | Analog Input |
| 20 | RX | UART Receive |
| 21 | TX | UART Transmit |
| 22 | SCL | I2C Clock |
| 23 | SDA | I2C Data |
| 24 | SCK | SPI Clock |
| 25 | MISO | SPI Master In Slave Out |
| 26 | MOSI | SPI Master Out Slave In |
| 27 | RST | Reset |
| 28 | USB | Micro USB for power and programming |
Powering the Board:
Connecting to Wi-Fi:
Interfacing with Sensors and Peripherals:
#include <WiFi.h>
// Replace with your network credentials
const char* ssid = "your_SSID";
const char* password = "your_PASSWORD";
void setup() {
// Initialize serial communication
Serial.begin(115200);
// Connect to Wi-Fi
WiFi.begin(ssid, password);
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
// Print the IP address
Serial.println("Connected to WiFi");
Serial.print("IP Address: ");
Serial.println(WiFi.localIP());
}
void loop() {
// Your main code here
}
Wi-Fi Connection Issues:
Power Supply Problems:
Pin Conflicts:
Code Upload Failures:
By following this documentation, you should be able to effectively utilize the Photon 2 microcontroller development board in your IoT projects. Whether you are a beginner or an experienced developer, the Photon 2 offers a powerful and versatile platform for creating connected devices.